| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |