OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/controls/message_box_view.h" | 5 #include "views/controls/message_box_view.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "ui/base/clipboard/clipboard.h" | 10 #include "ui/base/clipboard/clipboard.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 const std::wstring& default_prompt) | 39 const std::wstring& default_prompt) |
40 : message_label_(new views::Label(message)), | 40 : message_label_(new views::Label(message)), |
41 prompt_field_(NULL), | 41 prompt_field_(NULL), |
42 icon_(NULL), | 42 icon_(NULL), |
43 checkbox_(NULL), | 43 checkbox_(NULL), |
44 message_width_(kDefaultMessageWidth), | 44 message_width_(kDefaultMessageWidth), |
45 ALLOW_THIS_IN_INITIALIZER_LIST(focus_grabber_factory_(this)) { | 45 ALLOW_THIS_IN_INITIALIZER_LIST(focus_grabber_factory_(this)) { |
46 Init(dialog_flags, default_prompt); | 46 Init(dialog_flags, default_prompt); |
47 } | 47 } |
48 | 48 |
| 49 MessageBoxView::~MessageBoxView() {} |
| 50 |
49 std::wstring MessageBoxView::GetInputText() { | 51 std::wstring MessageBoxView::GetInputText() { |
50 if (prompt_field_) | 52 if (prompt_field_) |
51 return UTF16ToWideHack(prompt_field_->text()); | 53 return UTF16ToWideHack(prompt_field_->text()); |
52 return std::wstring(); | 54 return std::wstring(); |
53 } | 55 } |
54 | 56 |
55 bool MessageBoxView::IsCheckBoxSelected() { | 57 bool MessageBoxView::IsCheckBoxSelected() { |
56 return checkbox_ ? checkbox_->checked() : false; | 58 return checkbox_ ? checkbox_->checked() : false; |
57 } | 59 } |
58 | 60 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 } | 210 } |
209 | 211 |
210 if (checkbox_) { | 212 if (checkbox_) { |
211 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 213 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
212 layout->StartRow(0, checkbox_column_view_set_id); | 214 layout->StartRow(0, checkbox_column_view_set_id); |
213 layout->AddView(checkbox_); | 215 layout->AddView(checkbox_); |
214 } | 216 } |
215 | 217 |
216 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 218 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
217 } | 219 } |
OLD | NEW |