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

Side by Side Diff: chrome/browser/chromeos/login/password_changed_view.cc

Issue 6384002: views: Make CreatePanelGridLayout a static method of GridLayout class. (Closed)
Patch Set: fix trybots Created 9 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
OLDNEW
1 // Copyright (c) 2010 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 "chrome/browser/chromeos/login/password_changed_view.h" 5 #include "chrome/browser/chromeos/login/password_changed_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" 9 #include "chrome/browser/chromeos/login/rounded_rect_painter.h"
10 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" 10 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h"
11 #include "grit/generated_resources.h" 11 #include "grit/generated_resources.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 delta_sync_radio_->set_listener(this); 110 delta_sync_radio_->set_listener(this);
111 delta_sync_radio_->SetMultiLine(true); 111 delta_sync_radio_->SetMultiLine(true);
112 112
113 old_password_field_ = new Textfield(Textfield::STYLE_PASSWORD); 113 old_password_field_ = new Textfield(Textfield::STYLE_PASSWORD);
114 old_password_field_->set_text_to_display_when_empty( 114 old_password_field_->set_text_to_display_when_empty(
115 l10n_util::GetStringUTF16(IDS_LOGIN_PREVIOUS_PASSWORD)); 115 l10n_util::GetStringUTF16(IDS_LOGIN_PREVIOUS_PASSWORD));
116 old_password_field_->set_default_width_in_chars(kPasswordFieldWidthChars); 116 old_password_field_->set_default_width_in_chars(kPasswordFieldWidthChars);
117 old_password_field_->SetController(this); 117 old_password_field_->SetController(this);
118 118
119 // Define controls layout. 119 // Define controls layout.
120 GridLayout* layout = CreatePanelGridLayout(this); 120 GridLayout* layout = GridLayout::CreatePanel(this);
121 SetLayoutManager(layout); 121 SetLayoutManager(layout);
122 122
123 views::ColumnSet* column_set = layout->AddColumnSet(0); 123 views::ColumnSet* column_set = layout->AddColumnSet(0);
124 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1, 124 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1,
125 GridLayout::USE_PREF, 0, 0); 125 GridLayout::USE_PREF, 0, 0);
126 column_set = layout->AddColumnSet(1); 126 column_set = layout->AddColumnSet(1);
127 column_set->AddPaddingColumn(0, kUnrelatedControlLargeHorizontalSpacing); 127 column_set->AddPaddingColumn(0, kUnrelatedControlLargeHorizontalSpacing);
128 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1, 128 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1,
129 GridLayout::USE_PREF, 0, 0); 129 GridLayout::USE_PREF, 0, 0);
130 130
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 if (sender == full_sync_radio_) { 182 if (sender == full_sync_radio_) {
183 old_password_field_->SetEnabled(false); 183 old_password_field_->SetEnabled(false);
184 old_password_field_->SetText(string16()); 184 old_password_field_->SetText(string16());
185 } else if (sender == delta_sync_radio_) { 185 } else if (sender == delta_sync_radio_) {
186 old_password_field_->SetEnabled(true); 186 old_password_field_->SetEnabled(true);
187 old_password_field_->RequestFocus(); 187 old_password_field_->RequestFocus();
188 } 188 }
189 } 189 }
190 190
191 } // namespace chromeos 191 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/eula_view.cc ('k') | chrome/browser/chromeos/options/internet_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698