| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_ |
| 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
| 10 | 10 |
| 11 class ConstrainedWindow; | 11 class ConstrainedWindow; |
| 12 class TabContentsWrapper; | 12 class TabContents; |
| 13 typedef TabContents TabContentsWrapper; |
| 13 | 14 |
| 14 namespace content { | 15 namespace content { |
| 15 class DownloadItem; | 16 class DownloadItem; |
| 16 } | 17 } |
| 17 | 18 |
| 18 // Prompts the user for whether to Keep a dangerous DownloadItem using native | 19 // Prompts the user for whether to Keep a dangerous DownloadItem using native |
| 19 // UI. This prompt is invoked by the DownloadsDOMHandler when the user wants to | 20 // UI. This prompt is invoked by the DownloadsDOMHandler when the user wants to |
| 20 // accept a dangerous download. Having a native dialog intervene during the this | 21 // accept a dangerous download. Having a native dialog intervene during the this |
| 21 // workflow means that the chrome://downloads page no longer has the privilege | 22 // workflow means that the chrome://downloads page no longer has the privilege |
| 22 // to accept a dangerous download from script without user intervention. This | 23 // to accept a dangerous download from script without user intervention. This |
| (...skipping 21 matching lines...) Expand all Loading... |
| 44 | 45 |
| 45 protected: | 46 protected: |
| 46 friend class DownloadDangerPromptTest; | 47 friend class DownloadDangerPromptTest; |
| 47 | 48 |
| 48 // Only to be used by tests. Subclasses must override to manually call the | 49 // Only to be used by tests. Subclasses must override to manually call the |
| 49 // respective button click handler. | 50 // respective button click handler. |
| 50 virtual void InvokeActionForTesting(Action action) = 0; | 51 virtual void InvokeActionForTesting(Action action) = 0; |
| 51 }; | 52 }; |
| 52 | 53 |
| 53 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_ | 54 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_ |
| OLD | NEW |