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

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

Issue 2107493002: Offer user to send feedback from profile error dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and sky comments Created 4 years, 4 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
« sql/connection.h ('K') | « ui/views/controls/message_box_view.h ('k') | no next file » | 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) 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 message_width_(params.message_width) { 87 message_width_(params.message_width) {
88 Init(params); 88 Init(params);
89 } 89 }
90 90
91 MessageBoxView::~MessageBoxView() {} 91 MessageBoxView::~MessageBoxView() {}
92 92
93 base::string16 MessageBoxView::GetInputText() { 93 base::string16 MessageBoxView::GetInputText() {
94 return prompt_field_ ? prompt_field_->text() : base::string16(); 94 return prompt_field_ ? prompt_field_->text() : base::string16();
95 } 95 }
96 96
97 bool MessageBoxView::HasCheckBox() const {
98 return !!checkbox_;
sky 2016/07/27 15:12:56 nit: this is cheap, you make as well inline.
afakhry 2016/07/27 18:53:55 Done.
99 }
100
97 bool MessageBoxView::IsCheckBoxSelected() { 101 bool MessageBoxView::IsCheckBoxSelected() {
98 return checkbox_ ? checkbox_->checked() : false; 102 return checkbox_ ? checkbox_->checked() : false;
99 } 103 }
100 104
101 void MessageBoxView::SetCheckBoxLabel(const base::string16& label) { 105 void MessageBoxView::SetCheckBoxLabel(const base::string16& label) {
102 if (!checkbox_) 106 if (!checkbox_)
103 checkbox_ = new Checkbox(label); 107 checkbox_ = new Checkbox(label);
104 else 108 else
105 checkbox_->SetText(label); 109 checkbox_->SetText(label);
106 ResetLayoutManager(); 110 ResetLayoutManager();
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 248 }
245 249
246 if (link_) { 250 if (link_) {
247 layout->AddPaddingRow(0, inter_row_vertical_spacing_); 251 layout->AddPaddingRow(0, inter_row_vertical_spacing_);
248 layout->StartRow(0, extra_column_view_set_id); 252 layout->StartRow(0, extra_column_view_set_id);
249 layout->AddView(link_); 253 layout->AddView(link_);
250 } 254 }
251 } 255 }
252 256
253 } // namespace views 257 } // namespace views
OLDNEW
« sql/connection.h ('K') | « ui/views/controls/message_box_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698