| 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 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 | 9 |
| 10 class ConstrainedWindow; | |
| 11 | |
| 12 namespace content { | 10 namespace content { |
| 13 class DownloadItem; | 11 class DownloadItem; |
| 14 class WebContents; | 12 class WebContents; |
| 15 } | 13 } |
| 16 | 14 |
| 17 // Prompts the user for whether to Keep a dangerous DownloadItem using native | 15 // Prompts the user for whether to Keep a dangerous DownloadItem using native |
| 18 // UI. This prompt is invoked by the DownloadsDOMHandler when the user wants to | 16 // UI. This prompt is invoked by the DownloadsDOMHandler when the user wants to |
| 19 // accept a dangerous download. Having a native dialog intervene during the this | 17 // accept a dangerous download. Having a native dialog intervene during the this |
| 20 // workflow means that the chrome://downloads page no longer has the privilege | 18 // workflow means that the chrome://downloads page no longer has the privilege |
| 21 // to accept a dangerous download from script without user intervention. This | 19 // to accept a dangerous download from script without user intervention. This |
| (...skipping 21 matching lines...) Expand all Loading... |
| 43 | 41 |
| 44 protected: | 42 protected: |
| 45 friend class DownloadDangerPromptTest; | 43 friend class DownloadDangerPromptTest; |
| 46 | 44 |
| 47 // Only to be used by tests. Subclasses must override to manually call the | 45 // Only to be used by tests. Subclasses must override to manually call the |
| 48 // respective button click handler. | 46 // respective button click handler. |
| 49 virtual void InvokeActionForTesting(Action action) = 0; | 47 virtual void InvokeActionForTesting(Action action) = 0; |
| 50 }; | 48 }; |
| 51 | 49 |
| 52 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_ | 50 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_ |
| OLD | NEW |