OLD | NEW |
1 // Copyright (c) 2011 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 "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 8 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
9 #include "chrome/browser/chromeos/login/textfield_with_margin.h" | 9 #include "chrome/browser/chromeos/login/textfield_with_margin.h" |
10 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" | 10 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 return gfx::Size(views::Window::GetLocalizedContentsSize( | 69 return gfx::Size(views::Window::GetLocalizedContentsSize( |
70 IDS_PASSWORD_CHANGED_DIALOG_WIDTH_CHARS, | 70 IDS_PASSWORD_CHANGED_DIALOG_WIDTH_CHARS, |
71 IDS_PASSWORD_CHANGED_DIALOG_HEIGHT_LINES)); | 71 IDS_PASSWORD_CHANGED_DIALOG_HEIGHT_LINES)); |
72 } | 72 } |
73 | 73 |
74 void PasswordChangedView::ViewHierarchyChanged(bool is_add, | 74 void PasswordChangedView::ViewHierarchyChanged(bool is_add, |
75 views::View* parent, | 75 views::View* parent, |
76 views::View* child) { | 76 views::View* child) { |
77 if (is_add && child == this) { | 77 if (is_add && child == this) { |
78 Init(); | 78 Init(); |
79 WizardAccessibilityHelper::GetInstance()->MaybeEnableAccessibility(this); | |
80 } | 79 } |
81 } | 80 } |
82 | 81 |
83 void PasswordChangedView::Init() { | 82 void PasswordChangedView::Init() { |
84 // Set up fonts. | 83 // Set up fonts. |
85 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 84 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
86 gfx::Font title_font = rb.GetFont(ResourceBundle::MediumBoldFont); | 85 gfx::Font title_font = rb.GetFont(ResourceBundle::MediumBoldFont); |
87 | 86 |
88 // Create controls | 87 // Create controls |
89 title_label_ = new Label(); | 88 title_label_ = new Label(); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 if (sender == full_sync_radio_) { | 182 if (sender == full_sync_radio_) { |
184 old_password_field_->SetEnabled(false); | 183 old_password_field_->SetEnabled(false); |
185 old_password_field_->SetText(string16()); | 184 old_password_field_->SetText(string16()); |
186 } else if (sender == delta_sync_radio_) { | 185 } else if (sender == delta_sync_radio_) { |
187 old_password_field_->SetEnabled(true); | 186 old_password_field_->SetEnabled(true); |
188 old_password_field_->RequestFocus(); | 187 old_password_field_->RequestFocus(); |
189 } | 188 } |
190 } | 189 } |
191 | 190 |
192 } // namespace chromeos | 191 } // namespace chromeos |
OLD | NEW |