Chromium Code Reviews| Index: chrome/browser/ui/views/download/download_danger_prompt_views.cc |
| diff --git a/chrome/browser/ui/views/download/download_danger_prompt_views.cc b/chrome/browser/ui/views/download/download_danger_prompt_views.cc |
| index ca205beeba06dc5c987831ebe95c5534e457aaa9..7c412f2aa135bb404abce0e9c4946d24f834600f 100644 |
| --- a/chrome/browser/ui/views/download/download_danger_prompt_views.cc |
| +++ b/chrome/browser/ui/views/download/download_danger_prompt_views.cc |
| @@ -17,6 +17,7 @@ |
| #include "content/public/browser/download_item.h" |
| #include "ui/base/l10n/l10n_util.h" |
| #include "ui/base/resource/resource_bundle.h" |
| +#include "ui/base/ui_features.h" |
| #include "ui/views/controls/button/label_button.h" |
| #include "ui/views/controls/label.h" |
| #include "ui/views/layout/grid_layout.h" |
| @@ -325,11 +326,24 @@ void DownloadDangerPromptViews::RunDone(Action action) { |
| } // namespace |
| +#if !defined(OS_MACOSX) || BUILDFLAG(MAC_VIEWS_BROWSER) |
|
karandeepb
2017/01/23 06:51:40
maybe we can have a
#define COCOA_BROWSER #define
|
| +// static |
| DownloadDangerPrompt* DownloadDangerPrompt::Create( |
| content::DownloadItem* item, |
| content::WebContents* web_contents, |
| bool show_context, |
| const OnDone& done) { |
| + return DownloadDangerPrompt::CreateDownloadDangerPromptViews( |
| + item, web_contents, show_context, done); |
| +} |
| +#endif |
| + |
| +// static |
| +DownloadDangerPrompt* DownloadDangerPrompt::CreateDownloadDangerPromptViews( |
| + content::DownloadItem* item, |
| + content::WebContents* web_contents, |
| + bool show_context, |
| + const OnDone& done) { |
| DownloadDangerPromptViews* download_danger_prompt = |
| new DownloadDangerPromptViews(item, show_context, done); |
| constrained_window::ShowWebModalDialogViews(download_danger_prompt, |