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

Side by Side Diff: chrome/browser/ui/views/download/download_danger_prompt_views.cc

Issue 231173004: [WebModal] Rename NativeWebContentsModalDialogManager to SingleWebContentsDialogManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: constrained window test Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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->ShowModalDialog(
361 dialog->GetNativeView());
361 362
362 return download_danger_prompt; 363 return download_danger_prompt;
363 } 364 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698