OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |