OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/update_view.h" | 5 #include "chrome/browser/chromeos/login/update_view.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
11 #include "chrome/browser/chromeos/login/helper.h" | 11 #include "chrome/browser/chromeos/login/helper.h" |
12 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 12 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
13 #include "chrome/browser/chromeos/login/update_screen.h" | 13 #include "chrome/browser/chromeos/login/update_screen.h" |
| 14 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" |
14 #include "grit/chromium_strings.h" | 15 #include "grit/chromium_strings.h" |
15 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
16 #include "views/border.h" | 17 #include "views/border.h" |
17 #include "views/controls/label.h" | 18 #include "views/controls/label.h" |
18 #include "views/controls/progress_bar.h" | 19 #include "views/controls/progress_bar.h" |
19 #include "views/controls/throbber.h" | 20 #include "views/controls/throbber.h" |
20 #include "views/focus/focus_manager.h" | 21 #include "views/focus/focus_manager.h" |
21 #include "views/widget/widget.h" | 22 #include "views/widget/widget.h" |
22 | 23 |
23 using views::Background; | 24 using views::Background; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 if (a.GetKeyCode() == app::VKEY_ESCAPE) { | 203 if (a.GetKeyCode() == app::VKEY_ESCAPE) { |
203 if (controller_ != NULL) { | 204 if (controller_ != NULL) { |
204 controller_->CancelUpdate(); | 205 controller_->CancelUpdate(); |
205 } | 206 } |
206 return true; | 207 return true; |
207 } | 208 } |
208 #endif | 209 #endif |
209 return false; | 210 return false; |
210 } | 211 } |
211 | 212 |
| 213 void UpdateView::ViewHierarchyChanged(bool is_add, View* parent, View* child) { |
| 214 if (is_add && this == child) |
| 215 WizardAccessibilityHelper::GetInstance()->MaybeEnableAccessibility(this); |
| 216 } |
| 217 |
212 void UpdateView::InitLabel(views::Label** label) { | 218 void UpdateView::InitLabel(views::Label** label) { |
213 *label = new views::Label(); | 219 *label = new views::Label(); |
214 (*label)->SetColor(kLabelColor); | 220 (*label)->SetColor(kLabelColor); |
215 (*label)->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 221 (*label)->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
216 (*label)->SetMultiLine(true); | 222 (*label)->SetMultiLine(true); |
217 | 223 |
218 ResourceBundle& res_bundle = ResourceBundle::GetSharedInstance(); | 224 ResourceBundle& res_bundle = ResourceBundle::GetSharedInstance(); |
219 gfx::Font label_font = res_bundle.GetFont(ResourceBundle::MediumBoldFont); | 225 gfx::Font label_font = res_bundle.GetFont(ResourceBundle::MediumBoldFont); |
220 (*label)->SetFont(label_font); | 226 (*label)->SetFont(label_font); |
221 | 227 |
(...skipping 10 matching lines...) Expand all Loading... |
232 checking_label_->SetVisible(show_curtain_); | 238 checking_label_->SetVisible(show_curtain_); |
233 throbber_->SetVisible(show_curtain_); | 239 throbber_->SetVisible(show_curtain_); |
234 if (show_curtain_) { | 240 if (show_curtain_) { |
235 throbber_->Start(); | 241 throbber_->Start(); |
236 } else { | 242 } else { |
237 throbber_->Stop(); | 243 throbber_->Stop(); |
238 } | 244 } |
239 } | 245 } |
240 | 246 |
241 } // namespace chromeos | 247 } // namespace chromeos |
OLD | NEW |