| 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 "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/chromeos/login/helper.h" | 10 #include "chrome/browser/chromeos/login/helper.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 checking_label_, x_center + (throbber_width + 1) / 2 + space_half, | 189 checking_label_, x_center + (throbber_width + 1) / 2 + space_half, |
| 190 vertical_center); | 190 vertical_center); |
| 191 #if !defined(OFFICIAL_BUILD) | 191 #if !defined(OFFICIAL_BUILD) |
| 192 escape_to_skip_label_->SizeToFit(max_width); | 192 escape_to_skip_label_->SizeToFit(max_width); |
| 193 escape_to_skip_label_->SetX(right_margin); | 193 escape_to_skip_label_->SetX(right_margin); |
| 194 escape_to_skip_label_->SetY(kEscapeToSkipLabelY); | 194 escape_to_skip_label_->SetY(kEscapeToSkipLabelY); |
| 195 #endif | 195 #endif |
| 196 SchedulePaint(); | 196 SchedulePaint(); |
| 197 } | 197 } |
| 198 | 198 |
| 199 void UpdateView::ViewHierarchyChanged(bool is_add, View* parent, View* child) { | |
| 200 if (is_add && this == child) | |
| 201 WizardAccessibilityHelper::GetInstance()->MaybeEnableAccessibility(this); | |
| 202 } | |
| 203 | |
| 204 void UpdateView::InitLabel(views::Label** label) { | 199 void UpdateView::InitLabel(views::Label** label) { |
| 205 *label = new views::Label(); | 200 *label = new views::Label(); |
| 206 (*label)->SetColor(kLabelColor); | 201 (*label)->SetColor(kLabelColor); |
| 207 (*label)->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 202 (*label)->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 208 (*label)->SetMultiLine(true); | 203 (*label)->SetMultiLine(true); |
| 209 | 204 |
| 210 ResourceBundle& res_bundle = ResourceBundle::GetSharedInstance(); | 205 ResourceBundle& res_bundle = ResourceBundle::GetSharedInstance(); |
| 211 gfx::Font label_font = res_bundle.GetFont(ResourceBundle::MediumFont); | 206 gfx::Font label_font = res_bundle.GetFont(ResourceBundle::MediumFont); |
| 212 (*label)->SetFont(label_font); | 207 (*label)->SetFont(label_font); |
| 213 | 208 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 224 checking_label_->SetVisible(show_curtain_); | 219 checking_label_->SetVisible(show_curtain_); |
| 225 throbber_->SetVisible(show_curtain_); | 220 throbber_->SetVisible(show_curtain_); |
| 226 if (show_curtain_) { | 221 if (show_curtain_) { |
| 227 throbber_->Start(); | 222 throbber_->Start(); |
| 228 } else { | 223 } else { |
| 229 throbber_->Stop(); | 224 throbber_->Stop(); |
| 230 } | 225 } |
| 231 } | 226 } |
| 232 | 227 |
| 233 } // namespace chromeos | 228 } // namespace chromeos |
| OLD | NEW |