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

Side by Side Diff: chrome/browser/ui/views/tab_modal_confirm_dialog_views.cc

Issue 12045037: Refactor modality-specific behavior from ConstrainedWindowViews to WebContentsModalDialogManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Android link error Created 7 years, 10 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/utf_string_conversions.h" 7 #include "base/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 15 matching lines...) Expand all
26 26
27 ////////////////////////////////////////////////////////////////////////////// 27 //////////////////////////////////////////////////////////////////////////////
28 // TabModalConfirmDialogViews, constructor & destructor: 28 // TabModalConfirmDialogViews, constructor & destructor:
29 29
30 TabModalConfirmDialogViews::TabModalConfirmDialogViews( 30 TabModalConfirmDialogViews::TabModalConfirmDialogViews(
31 TabModalConfirmDialogDelegate* delegate, 31 TabModalConfirmDialogDelegate* delegate,
32 content::WebContents* web_contents) 32 content::WebContents* web_contents)
33 : delegate_(delegate), 33 : delegate_(delegate),
34 message_box_view_(new views::MessageBoxView( 34 message_box_view_(new views::MessageBoxView(
35 views::MessageBoxView::InitParams(delegate->GetMessage()))) { 35 views::MessageBoxView::InitParams(delegate->GetMessage()))) {
36 delegate_->set_window(new ConstrainedWindowViews(web_contents, this)); 36 delegate_->set_window(ConstrainedWindowViews::Create(web_contents, this));
37 } 37 }
38 38
39 TabModalConfirmDialogViews::~TabModalConfirmDialogViews() { 39 TabModalConfirmDialogViews::~TabModalConfirmDialogViews() {
40 } 40 }
41 41
42 void TabModalConfirmDialogViews::AcceptTabModalDialog() { 42 void TabModalConfirmDialogViews::AcceptTabModalDialog() {
43 GetDialogClientView()->AcceptWindow(); 43 GetDialogClientView()->AcceptWindow();
44 } 44 }
45 45
46 void TabModalConfirmDialogViews::CancelTabModalDialog() { 46 void TabModalConfirmDialogViews::CancelTabModalDialog() {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 delete this; 92 delete this;
93 } 93 }
94 94
95 ui::ModalType TabModalConfirmDialogViews::GetModalType() const { 95 ui::ModalType TabModalConfirmDialogViews::GetModalType() const {
96 #if defined(USE_ASH) 96 #if defined(USE_ASH)
97 return ui::MODAL_TYPE_CHILD; 97 return ui::MODAL_TYPE_CHILD;
98 #else 98 #else
99 return views::WidgetDelegate::GetModalType(); 99 return views::WidgetDelegate::GetModalType();
100 #endif 100 #endif
101 } 101 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698