Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: chrome/browser/download/download_danger_prompt.h

Issue 2630243003: MacViews: Enable views based Download recovery dialog behind secondary-ui-md flag. (Closed)
Patch Set: Correct method comment. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/download/download_danger_prompt_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_danger_prompt.h
diff --git a/chrome/browser/download/download_danger_prompt.h b/chrome/browser/download/download_danger_prompt.h
index 5984adf3637174e73625669a0685c2ef5f92bfaf..5c3bb4107c89d43b89c74f1d2eac7884048eedc1 100644
--- a/chrome/browser/download/download_danger_prompt.h
+++ b/chrome/browser/download/download_danger_prompt.h
@@ -33,14 +33,14 @@ class DownloadDangerPrompt {
};
typedef base::Callback<void(Action)> OnDone;
- // Return a new self-deleting DownloadDangerPrompt. |accepted| or |canceled|
- // will be run when the the respective action is invoked. |canceled| may also
- // be called when |item| is either no longer dangerous or no longer in
- // progress, or if the tab corresponding to |web_contents| is
- // closing. The returned DownloadDangerPrompt* is only used for testing. The
- // caller does not own the object and receive no guarantees about lifetime.
- // If |show_context|, then the prompt message will contain some information
- // about the download and its danger; otherwise it won't.
+ // Return a new self-deleting DownloadDangerPrompt. The returned
+ // DownloadDangerPrompt* is only used for testing. The caller does not own the
+ // object and receives no guarantees about lifetime. If |show_context|, then
+ // the prompt message will contain some information about the download and its
+ // danger; otherwise it won't. |done| is a callback called when the ACCEPT,
+ // CANCEL or DISMISS action is invoked. |done| may be called with the CANCEL
+ // action even when |item| is either no longer dangerous or no longer in
+ // progress, or if the tab corresponding to |web_contents| is closing.
static DownloadDangerPrompt* Create(content::DownloadItem* item,
content::WebContents* web_contents,
bool show_context,
@@ -65,6 +65,14 @@ class DownloadDangerPrompt {
// Records UMA stats for a download danger prompt event.
static void RecordDownloadDangerPrompt(bool did_proceed,
const content::DownloadItem& download);
+
+ private:
+ // Returns a toolkit-views based download danger prompt.
+ static DownloadDangerPrompt* CreateDownloadDangerPromptViews(
+ content::DownloadItem* item,
+ content::WebContents* web_contents,
+ bool show_context,
+ const OnDone& done);
};
#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_
« no previous file with comments | « no previous file | chrome/browser/download/download_danger_prompt_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698