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

Side by Side Diff: chrome/browser/ui/views/tab_modal_confirm_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/tab_modal_confirm_dialog_views.h" 5 #include "chrome/browser/ui/views/tab_modal_confirm_dialog_views.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/ui/browser_dialogs.h" 8 #include "chrome/browser/ui/browser_dialogs.h"
9 #include "chrome/browser/ui/browser_list.h" 9 #include "chrome/browser/ui/browser_list.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 if (!link_text.empty()) 50 if (!link_text.empty())
51 message_box_view_->SetLink(link_text, this); 51 message_box_view_->SetLink(link_text, this);
52 52
53 WebContentsModalDialogManager* web_contents_modal_dialog_manager = 53 WebContentsModalDialogManager* web_contents_modal_dialog_manager =
54 WebContentsModalDialogManager::FromWebContents(web_contents); 54 WebContentsModalDialogManager::FromWebContents(web_contents);
55 WebContentsModalDialogManagerDelegate* modal_delegate = 55 WebContentsModalDialogManagerDelegate* modal_delegate =
56 web_contents_modal_dialog_manager->delegate(); 56 web_contents_modal_dialog_manager->delegate();
57 DCHECK(modal_delegate); 57 DCHECK(modal_delegate);
58 dialog_ = views::Widget::CreateWindowAsFramelessChild( 58 dialog_ = views::Widget::CreateWindowAsFramelessChild(
59 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); 59 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView());
60 web_contents_modal_dialog_manager->ShowDialog(dialog_->GetNativeView()); 60 web_contents_modal_dialog_manager->ShowModalDialog(
61 dialog_->GetNativeView());
61 delegate_->set_close_delegate(this); 62 delegate_->set_close_delegate(this);
62 } 63 }
63 64
64 TabModalConfirmDialogViews::~TabModalConfirmDialogViews() { 65 TabModalConfirmDialogViews::~TabModalConfirmDialogViews() {
65 } 66 }
66 67
67 void TabModalConfirmDialogViews::AcceptTabModalDialog() { 68 void TabModalConfirmDialogViews::AcceptTabModalDialog() {
68 GetDialogClientView()->AcceptWindow(); 69 GetDialogClientView()->AcceptWindow();
69 } 70 }
70 71
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 delete this; 135 delete this;
135 } 136 }
136 137
137 ui::ModalType TabModalConfirmDialogViews::GetModalType() const { 138 ui::ModalType TabModalConfirmDialogViews::GetModalType() const {
138 #if defined(USE_ASH) 139 #if defined(USE_ASH)
139 return ui::MODAL_TYPE_CHILD; 140 return ui::MODAL_TYPE_CHILD;
140 #else 141 #else
141 return views::WidgetDelegate::GetModalType(); 142 return views::WidgetDelegate::GetModalType();
142 #endif 143 #endif
143 } 144 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698