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

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

Issue 18179004: Dismiss action in tab modal dialogs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test for Mac Created 7 years, 4 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
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 bool TabModalConfirmDialogViews::Cancel() { 104 bool TabModalConfirmDialogViews::Cancel() {
105 delegate_->Cancel(); 105 delegate_->Cancel();
106 return true; 106 return true;
107 } 107 }
108 108
109 bool TabModalConfirmDialogViews::Accept() { 109 bool TabModalConfirmDialogViews::Accept() {
110 delegate_->Accept(); 110 delegate_->Accept();
111 return true; 111 return true;
112 } 112 }
113 113
114 bool TabModalConfirmDialogViews::Close() {
115 delegate_->Close();
116 return true;
117 }
118
114 /////////////////////////////////////////////////////////////////////////////// 119 ///////////////////////////////////////////////////////////////////////////////
115 // TabModalConfirmDialogViews, views::WidgetDelegate implementation: 120 // TabModalConfirmDialogViews, views::WidgetDelegate implementation:
116 121
117 views::View* TabModalConfirmDialogViews::GetContentsView() { 122 views::View* TabModalConfirmDialogViews::GetContentsView() {
118 return message_box_view_; 123 return message_box_view_;
119 } 124 }
120 125
121 // TODO(wittman): Remove this override once we move to the new style frame view 126 // TODO(wittman): Remove this override once we move to the new style frame view
122 // on all dialogs. 127 // on all dialogs.
123 views::NonClientFrameView* TabModalConfirmDialogViews::CreateNonClientFrameView( 128 views::NonClientFrameView* TabModalConfirmDialogViews::CreateNonClientFrameView(
(...skipping 13 matching lines...) Expand all
137 delete this; 142 delete this;
138 } 143 }
139 144
140 ui::ModalType TabModalConfirmDialogViews::GetModalType() const { 145 ui::ModalType TabModalConfirmDialogViews::GetModalType() const {
141 #if defined(USE_ASH) 146 #if defined(USE_ASH)
142 return ui::MODAL_TYPE_CHILD; 147 return ui::MODAL_TYPE_CHILD;
143 #else 148 #else
144 return views::WidgetDelegate::GetModalType(); 149 return views::WidgetDelegate::GetModalType();
145 #endif 150 #endif
146 } 151 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tab_modal_confirm_dialog_views.h ('k') | ui/views/window/dialog_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698