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

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

Issue 120503005: Merge NativeTextfieldViews into views::Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix touch drag and drop unit test. Created 6 years, 11 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/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 icon_(NULL), 79 icon_(NULL),
80 checkbox_(NULL), 80 checkbox_(NULL),
81 link_(NULL), 81 link_(NULL),
82 message_width_(params.message_width) { 82 message_width_(params.message_width) {
83 Init(params); 83 Init(params);
84 } 84 }
85 85
86 MessageBoxView::~MessageBoxView() {} 86 MessageBoxView::~MessageBoxView() {}
87 87
88 base::string16 MessageBoxView::GetInputText() { 88 base::string16 MessageBoxView::GetInputText() {
89 return prompt_field_ ? prompt_field_->text() : base::string16(); 89 return prompt_field_ ? prompt_field_->GetText() : base::string16();
90 } 90 }
91 91
92 bool MessageBoxView::IsCheckBoxSelected() { 92 bool MessageBoxView::IsCheckBoxSelected() {
93 return checkbox_ ? checkbox_->checked() : false; 93 return checkbox_ ? checkbox_->checked() : false;
94 } 94 }
95 95
96 void MessageBoxView::SetIcon(const gfx::ImageSkia& icon) { 96 void MessageBoxView::SetIcon(const gfx::ImageSkia& icon) {
97 if (!icon_) 97 if (!icon_)
98 icon_ = new ImageView(); 98 icon_ = new ImageView();
99 icon_->SetImage(icon); 99 icon_->SetImage(icon);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 270 }
271 271
272 if (link_) { 272 if (link_) {
273 layout->AddPaddingRow(0, inter_row_vertical_spacing_); 273 layout->AddPaddingRow(0, inter_row_vertical_spacing_);
274 layout->StartRow(0, extra_column_view_set_id); 274 layout->StartRow(0, extra_column_view_set_id);
275 layout->AddView(link_); 275 layout->AddView(link_);
276 } 276 }
277 } 277 }
278 278
279 } // namespace views 279 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698