Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Side by Side Diff: views/controls/message_box_view.cc

Issue 7717028: views: Remove NativeTextButton::SetLabel() and replace all call sites with SetText(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: also removes label() Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/button/text_button.h ('k') | views/window/dialog_client_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « views/controls/button/text_button.h ('k') | views/window/dialog_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698