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/oobe_progress_bar.h" | 5 #include "chrome/browser/chromeos/login/oobe_progress_bar.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "gfx/canvas_skia.h" | 10 #include "gfx/canvas_skia.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 x + kTextPadding, y + dot->height() + kTextPadding, | 115 x + kTextPadding, y + dot->height() + kTextPadding, |
116 (next_x - x - 2 * kTextPadding), | 116 (next_x - x - 2 * kTextPadding), |
117 (bounds.height() - dot->height() - 2 * kTextPadding), | 117 (bounds.height() - dot->height() - 2 * kTextPadding), |
118 gfx::Canvas::MULTI_LINE | gfx::Canvas::TEXT_ALIGN_CENTER | | 118 gfx::Canvas::MULTI_LINE | gfx::Canvas::TEXT_ALIGN_CENTER | |
119 gfx::Canvas::TEXT_VALIGN_TOP); | 119 gfx::Canvas::TEXT_VALIGN_TOP); |
120 | 120 |
121 x = next_x; | 121 x = next_x; |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 void OobeProgressBar::LocaleChanged() { | 125 void OobeProgressBar::OnLocaleChanged() { |
126 SchedulePaint(); | 126 SchedulePaint(); |
127 } | 127 } |
128 | 128 |
129 void OobeProgressBar::SetProgress(size_t progress) { | 129 void OobeProgressBar::SetProgress(size_t progress) { |
130 DCHECK(progress < steps_.size()); | 130 DCHECK(progress < steps_.size()); |
131 progress_ = progress; | 131 progress_ = progress; |
132 SchedulePaint(); | 132 SchedulePaint(); |
133 } | 133 } |
134 | 134 |
135 } // namespace chromeos | 135 } // namespace chromeos |
OLD | NEW |