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/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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 TabModalConfirmDialogDelegate* delegate, | 54 TabModalConfirmDialogDelegate* delegate, |
55 content::WebContents* web_contents, | 55 content::WebContents* web_contents, |
56 bool enable_chrome_style) | 56 bool enable_chrome_style) |
57 : delegate_(delegate), | 57 : delegate_(delegate), |
58 message_box_view_(new views::MessageBoxView( | 58 message_box_view_(new views::MessageBoxView( |
59 CreateMessageBoxViewInitParams(delegate->GetMessage(), | 59 CreateMessageBoxViewInitParams(delegate->GetMessage(), |
60 enable_chrome_style))), | 60 enable_chrome_style))), |
61 enable_chrome_style_(enable_chrome_style) { | 61 enable_chrome_style_(enable_chrome_style) { |
62 delegate_->set_window(new ConstrainedWindowViews( | 62 delegate_->set_window(new ConstrainedWindowViews( |
63 web_contents, this, enable_chrome_style, | 63 web_contents, this, enable_chrome_style, |
64 ConstrainedWindowViews::DEFAULT_INSETS)); | 64 ConstrainedWindowViews::FRAME_LAYOUT_FULL)); |
65 } | 65 } |
66 | 66 |
67 TabModalConfirmDialogViews::~TabModalConfirmDialogViews() { | 67 TabModalConfirmDialogViews::~TabModalConfirmDialogViews() { |
68 } | 68 } |
69 | 69 |
70 void TabModalConfirmDialogViews::AcceptTabModalDialog() { | 70 void TabModalConfirmDialogViews::AcceptTabModalDialog() { |
71 GetDialogClientView()->AcceptWindow(); | 71 GetDialogClientView()->AcceptWindow(); |
72 } | 72 } |
73 | 73 |
74 void TabModalConfirmDialogViews::CancelTabModalDialog() { | 74 void TabModalConfirmDialogViews::CancelTabModalDialog() { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 return message_box_view_->GetWidget(); | 116 return message_box_view_->GetWidget(); |
117 } | 117 } |
118 | 118 |
119 const views::Widget* TabModalConfirmDialogViews::GetWidget() const { | 119 const views::Widget* TabModalConfirmDialogViews::GetWidget() const { |
120 return message_box_view_->GetWidget(); | 120 return message_box_view_->GetWidget(); |
121 } | 121 } |
122 | 122 |
123 void TabModalConfirmDialogViews::DeleteDelegate() { | 123 void TabModalConfirmDialogViews::DeleteDelegate() { |
124 delete this; | 124 delete this; |
125 } | 125 } |
OLD | NEW |