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 namespace content { | 10 namespace content { |
(...skipping 22 matching lines...) Expand all Loading... | |
33 // progress, or if the tab corresponding to |web_contents| is | 33 // progress, or if the tab corresponding to |web_contents| is |
34 // closing. The returned DownloadDangerPrompt* is only used for testing. The | 34 // closing. The returned DownloadDangerPrompt* is only used for testing. The |
35 // caller does not own the object and receive no guarantees about lifetime. | 35 // caller does not own the object and receive no guarantees about lifetime. |
36 // If |show_context|, then the prompt message will contain some information | 36 // If |show_context|, then the prompt message will contain some information |
37 // about the download and its danger; otherwise it won't. | 37 // about the download and its danger; otherwise it won't. |
38 static DownloadDangerPrompt* Create( | 38 static DownloadDangerPrompt* Create( |
39 content::DownloadItem* item, | 39 content::DownloadItem* item, |
40 content::WebContents* web_contents, | 40 content::WebContents* web_contents, |
41 bool show_context, | 41 bool show_context, |
42 const base::Closure& accepted, | 42 const base::Closure& accepted, |
43 const base::Closure& canceled); | 43 const base::Closure& canceled, |
44 const base::Closure& destroyed); | |
asanka
2013/06/28 21:59:59
I'm guessing this would be the equivalent of the n
benjhayden
2013/07/11 15:32:28
Done.
| |
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 |