OLD | NEW |
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 bool TabModalConfirmDialogViews::Cancel() { | 112 bool TabModalConfirmDialogViews::Cancel() { |
113 delegate_->Cancel(); | 113 delegate_->Cancel(); |
114 return true; | 114 return true; |
115 } | 115 } |
116 | 116 |
117 bool TabModalConfirmDialogViews::Accept() { | 117 bool TabModalConfirmDialogViews::Accept() { |
118 delegate_->Accept(); | 118 delegate_->Accept(); |
119 return true; | 119 return true; |
120 } | 120 } |
121 | 121 |
| 122 bool TabModalConfirmDialogViews::Close() { |
| 123 delegate_->Close(); |
| 124 return true; |
| 125 } |
| 126 |
122 /////////////////////////////////////////////////////////////////////////////// | 127 /////////////////////////////////////////////////////////////////////////////// |
123 // TabModalConfirmDialogViews, views::WidgetDelegate implementation: | 128 // TabModalConfirmDialogViews, views::WidgetDelegate implementation: |
124 | 129 |
125 views::View* TabModalConfirmDialogViews::GetContentsView() { | 130 views::View* TabModalConfirmDialogViews::GetContentsView() { |
126 return message_box_view_; | 131 return message_box_view_; |
127 } | 132 } |
128 | 133 |
129 // TODO(wittman): Remove this override once we move to the new style frame view | 134 // TODO(wittman): Remove this override once we move to the new style frame view |
130 // on all dialogs. | 135 // on all dialogs. |
131 views::NonClientFrameView* TabModalConfirmDialogViews::CreateNonClientFrameView( | 136 views::NonClientFrameView* TabModalConfirmDialogViews::CreateNonClientFrameView( |
(...skipping 13 matching lines...) Expand all Loading... |
145 delete this; | 150 delete this; |
146 } | 151 } |
147 | 152 |
148 ui::ModalType TabModalConfirmDialogViews::GetModalType() const { | 153 ui::ModalType TabModalConfirmDialogViews::GetModalType() const { |
149 #if defined(USE_ASH) | 154 #if defined(USE_ASH) |
150 return ui::MODAL_TYPE_CHILD; | 155 return ui::MODAL_TYPE_CHILD; |
151 #else | 156 #else |
152 return views::WidgetDelegate::GetModalType(); | 157 return views::WidgetDelegate::GetModalType(); |
153 #endif | 158 #endif |
154 } | 159 } |
OLD | NEW |