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

Side by Side Diff: chrome/browser/chromeos/ui/request_pin_view.cc

Issue 2779973003: views: fold layout_utils::CreatePanelLayout into GridLayout::CreatePanel (Closed)
Patch Set: remove old DEPS entry Created 3 years, 8 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/chromeos/ui/request_pin_view.h" 5 #include "chrome/browser/chromeos/ui/request_pin_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 void RequestPinView::UpdateHeaderText() { 155 void RequestPinView::UpdateHeaderText() {
156 int label_text_id = IDS_REQUEST_PIN_DIALOG_HEADER; 156 int label_text_id = IDS_REQUEST_PIN_DIALOG_HEADER;
157 base::string16 label_text = 157 base::string16 label_text =
158 l10n_util::GetStringFUTF16(label_text_id, window_title_, code_type_); 158 l10n_util::GetStringFUTF16(label_text_id, window_title_, code_type_);
159 header_label_->SetText(label_text); 159 header_label_->SetText(label_text);
160 header_label_->SizeToPreferredSize(); 160 header_label_->SizeToPreferredSize();
161 } 161 }
162 162
163 void RequestPinView::Init() { 163 void RequestPinView::Init() {
164 views::GridLayout* layout = views::GridLayout::CreatePanel(this); 164 views::GridLayout* layout = views::GridLayout::CreatePanel(this);
165 SetLayoutManager(layout);
166 165
167 int column_view_set_id = 0; 166 int column_view_set_id = 0;
168 views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id); 167 views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id);
169 168
170 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, 169 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1,
171 views::GridLayout::USE_PREF, 0, 0); 170 views::GridLayout::USE_PREF, 0, 0);
172 layout->StartRow(0, column_view_set_id); 171 layout->StartRow(0, column_view_set_id);
173 172
174 // Infomation label. 173 // Infomation label.
175 int label_text_id = IDS_REQUEST_PIN_DIALOG_HEADER; 174 int label_text_id = IDS_REQUEST_PIN_DIALOG_HEADER;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 252 }
254 253
255 error_label_->SetVisible(true); 254 error_label_->SetVisible(true);
256 error_label_->SetText(error_message); 255 error_label_->SetText(error_message);
257 error_label_->SetTooltipText(error_message); 256 error_label_->SetTooltipText(error_message);
258 error_label_->SetEnabledColor(SK_ColorRED); 257 error_label_->SetEnabledColor(SK_ColorRED);
259 error_label_->SizeToPreferredSize(); 258 error_label_->SizeToPreferredSize();
260 } 259 }
261 260
262 } // namespace chromeos 261 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/wimax_config_view.cc ('k') | chrome/browser/first_run/try_chrome_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698