| 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/accessibility/accessible_view_state.h" | 10 #include "ui/base/accessibility/accessible_view_state.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 icon_ = new ImageView(); | 70 icon_ = new ImageView(); |
| 71 icon_->SetImage(icon); | 71 icon_->SetImage(icon); |
| 72 icon_->SetBounds(0, 0, icon.width(), icon.height()); | 72 icon_->SetBounds(0, 0, icon.width(), icon.height()); |
| 73 ResetLayoutManager(); | 73 ResetLayoutManager(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void MessageBoxView::SetCheckBoxLabel(const std::wstring& label) { | 76 void MessageBoxView::SetCheckBoxLabel(const std::wstring& label) { |
| 77 if (!checkbox_) | 77 if (!checkbox_) |
| 78 checkbox_ = new Checkbox(label); | 78 checkbox_ = new Checkbox(label); |
| 79 else | 79 else |
| 80 checkbox_->SetLabel(label); | 80 checkbox_->SetText(label); |
| 81 ResetLayoutManager(); | 81 ResetLayoutManager(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void MessageBoxView::SetCheckBoxSelected(bool selected) { | 84 void MessageBoxView::SetCheckBoxSelected(bool selected) { |
| 85 if (!checkbox_) | 85 if (!checkbox_) |
| 86 return; | 86 return; |
| 87 checkbox_->SetChecked(selected); | 87 checkbox_->SetChecked(selected); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void MessageBoxView::GetAccessibleState(ui::AccessibleViewState* state) { | 90 void MessageBoxView::GetAccessibleState(ui::AccessibleViewState* state) { |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 if (checkbox_) { | 223 if (checkbox_) { |
| 224 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); | 224 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
| 225 layout->StartRow(0, checkbox_column_view_set_id); | 225 layout->StartRow(0, checkbox_column_view_set_id); |
| 226 layout->AddView(checkbox_); | 226 layout->AddView(checkbox_); |
| 227 } | 227 } |
| 228 | 228 |
| 229 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); | 229 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace views | 232 } // namespace views |
| OLD | NEW |