| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "base/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
| 6 #include "chrome/browser/download/download_danger_prompt.h" | 6 #include "chrome/browser/download/download_danger_prompt.h" |
| 7 #include "chrome/browser/download/download_stats.h" | 7 #include "chrome/browser/download/download_stats.h" |
| 8 #include "components/web_modal/web_contents_modal_dialog_host.h" | 8 #include "components/web_modal/web_contents_modal_dialog_host.h" |
| 9 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 9 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 10 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" | 10 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 new DownloadDangerPromptViews(item, web_contents, show_context, done); | 350 new DownloadDangerPromptViews(item, web_contents, show_context, done); |
| 351 | 351 |
| 352 WebContentsModalDialogManager* web_contents_modal_dialog_manager = | 352 WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
| 353 WebContentsModalDialogManager::FromWebContents(web_contents); | 353 WebContentsModalDialogManager::FromWebContents(web_contents); |
| 354 WebContentsModalDialogManagerDelegate* modal_delegate = | 354 WebContentsModalDialogManagerDelegate* modal_delegate = |
| 355 web_contents_modal_dialog_manager->delegate(); | 355 web_contents_modal_dialog_manager->delegate(); |
| 356 CHECK(modal_delegate); | 356 CHECK(modal_delegate); |
| 357 views::Widget* dialog = views::Widget::CreateWindowAsFramelessChild( | 357 views::Widget* dialog = views::Widget::CreateWindowAsFramelessChild( |
| 358 download_danger_prompt, | 358 download_danger_prompt, |
| 359 modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); | 359 modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); |
| 360 web_contents_modal_dialog_manager->ShowDialog(dialog->GetNativeView()); | 360 web_contents_modal_dialog_manager->ShowWebModalDialog( |
| 361 dialog->GetNativeView()); |
| 361 | 362 |
| 362 return download_danger_prompt; | 363 return download_danger_prompt; |
| 363 } | 364 } |
| OLD | NEW |