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

Side by Side Diff: chrome/browser/ui/views/extensions/media_galleries_scan_result_dialog_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/views/extensions/media_galleries_scan_result_dialog_ views.h" 5 #include "chrome/browser/ui/views/extensions/media_galleries_scan_result_dialog_ views.h"
6 6
7 #include "chrome/browser/ui/views/extensions/media_gallery_checkbox_view.h" 7 #include "chrome/browser/ui/views/extensions/media_gallery_checkbox_view.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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // care of deleting itself after calling DeleteDelegate(). 71 // care of deleting itself after calling DeleteDelegate().
72 web_modal::WebContentsModalDialogManager* web_contents_modal_dialog_manager = 72 web_modal::WebContentsModalDialogManager* web_contents_modal_dialog_manager =
73 web_modal::WebContentsModalDialogManager::FromWebContents( 73 web_modal::WebContentsModalDialogManager::FromWebContents(
74 controller->web_contents()); 74 controller->web_contents());
75 DCHECK(web_contents_modal_dialog_manager); 75 DCHECK(web_contents_modal_dialog_manager);
76 web_modal::WebContentsModalDialogManagerDelegate* modal_delegate = 76 web_modal::WebContentsModalDialogManagerDelegate* modal_delegate =
77 web_contents_modal_dialog_manager->delegate(); 77 web_contents_modal_dialog_manager->delegate();
78 DCHECK(modal_delegate); 78 DCHECK(modal_delegate);
79 window_ = views::Widget::CreateWindowAsFramelessChild( 79 window_ = views::Widget::CreateWindowAsFramelessChild(
80 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); 80 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView());
81 web_contents_modal_dialog_manager->ShowDialog(window_->GetNativeView()); 81 web_contents_modal_dialog_manager->ShowModalDialog(
82 window_->GetNativeView());
82 } 83 }
83 84
84 MediaGalleriesScanResultDialogViews::~MediaGalleriesScanResultDialogViews() {} 85 MediaGalleriesScanResultDialogViews::~MediaGalleriesScanResultDialogViews() {}
85 86
86 void MediaGalleriesScanResultDialogViews::InitChildViews() { 87 void MediaGalleriesScanResultDialogViews::InitChildViews() {
87 // Outer dialog layout. 88 // Outer dialog layout.
88 contents_->RemoveAllChildViews(true); 89 contents_->RemoveAllChildViews(true);
89 int dialog_content_width = views::Widget::GetLocalizedContentsWidth( 90 int dialog_content_width = views::Widget::GetLocalizedContentsWidth(
90 IDS_MEDIA_GALLERIES_DIALOG_CONTENT_WIDTH_CHARS); 91 IDS_MEDIA_GALLERIES_DIALOG_CONTENT_WIDTH_CHARS);
91 views::GridLayout* layout = views::GridLayout::CreatePanel(contents_); 92 views::GridLayout* layout = views::GridLayout::CreatePanel(contents_);
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 web_contents_modal_dialog_manager).CloseAllDialogs(); 291 web_contents_modal_dialog_manager).CloseAllDialogs();
291 } 292 }
292 293
293 // MediaGalleriesScanResultDialogViewsController ------------------------------- 294 // MediaGalleriesScanResultDialogViewsController -------------------------------
294 295
295 // static 296 // static
296 MediaGalleriesScanResultDialog* MediaGalleriesScanResultDialog::Create( 297 MediaGalleriesScanResultDialog* MediaGalleriesScanResultDialog::Create(
297 MediaGalleriesScanResultDialogController* controller) { 298 MediaGalleriesScanResultDialogController* controller) {
298 return new MediaGalleriesScanResultDialogViews(controller); 299 return new MediaGalleriesScanResultDialogViews(controller);
299 } 300 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/media_galleries_dialog_views.cc ('k') | chrome/browser/ui/views/login_prompt_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698