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

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

Issue 10437006: Converts ui/views/controls, ui/views/examples, ui/base/models to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 7 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
OLDNEW
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 "ui/views/controls/message_box_view.h" 5 #include "ui/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/string_split.h" 9 #include "base/string_split.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 MessageBoxView::~MessageBoxView() {} 84 MessageBoxView::~MessageBoxView() {}
85 85
86 string16 MessageBoxView::GetInputText() { 86 string16 MessageBoxView::GetInputText() {
87 return prompt_field_ ? prompt_field_->text() : string16(); 87 return prompt_field_ ? prompt_field_->text() : string16();
88 } 88 }
89 89
90 bool MessageBoxView::IsCheckBoxSelected() { 90 bool MessageBoxView::IsCheckBoxSelected() {
91 return checkbox_ ? checkbox_->checked() : false; 91 return checkbox_ ? checkbox_->checked() : false;
92 } 92 }
93 93
94 void MessageBoxView::SetIcon(const SkBitmap& icon) { 94 void MessageBoxView::SetIcon(const gfx::ImageSkia& icon) {
95 if (!icon_) 95 if (!icon_)
96 icon_ = new ImageView(); 96 icon_ = new ImageView();
97 icon_->SetImage(icon); 97 icon_->SetImage(icon);
98 icon_->SetBounds(0, 0, icon.width(), icon.height()); 98 icon_->SetBounds(0, 0, icon.width(), icon.height());
99 ResetLayoutManager(); 99 ResetLayoutManager();
100 } 100 }
101 101
102 void MessageBoxView::SetCheckBoxLabel(const string16& label) { 102 void MessageBoxView::SetCheckBoxLabel(const string16& label) {
103 if (!checkbox_) 103 if (!checkbox_)
104 checkbox_ = new Checkbox(label); 104 checkbox_ = new Checkbox(label);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 if (checkbox_) { 261 if (checkbox_) {
262 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 262 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
263 layout->StartRow(0, checkbox_column_view_set_id); 263 layout->StartRow(0, checkbox_column_view_set_id);
264 layout->AddView(checkbox_); 264 layout->AddView(checkbox_);
265 } 265 }
266 266
267 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 267 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
268 } 268 }
269 269
270 } // namespace views 270 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698