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 "base/utf_string_conversions.h" |
11 #include "chrome/browser/chromeos/login/helper.h" | 12 #include "chrome/browser/chromeos/login/helper.h" |
12 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 13 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
13 #include "chrome/browser/chromeos/login/update_screen.h" | 14 #include "chrome/browser/chromeos/login/update_screen.h" |
14 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" | 15 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" |
15 #include "grit/chromium_strings.h" | 16 #include "grit/chromium_strings.h" |
16 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
17 #include "views/border.h" | 18 #include "views/border.h" |
18 #include "views/controls/label.h" | 19 #include "views/controls/label.h" |
19 #include "views/controls/progress_bar.h" | 20 #include "views/controls/progress_bar.h" |
20 #include "views/controls/throbber.h" | 21 #include "views/controls/throbber.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 99 |
99 UpdateLocalizedStrings(); | 100 UpdateLocalizedStrings(); |
100 UpdateVisibility(); | 101 UpdateVisibility(); |
101 } | 102 } |
102 | 103 |
103 void UpdateView::Reset() { | 104 void UpdateView::Reset() { |
104 progress_bar_->SetProgress(0); | 105 progress_bar_->SetProgress(0); |
105 } | 106 } |
106 | 107 |
107 void UpdateView::UpdateLocalizedStrings() { | 108 void UpdateView::UpdateLocalizedStrings() { |
108 installing_updates_label_->SetText( | 109 installing_updates_label_->SetText(UTF16ToWide(l10n_util::GetStringFUTF16( |
109 l10n_util::GetStringF(IDS_INSTALLING_UPDATE, | 110 IDS_INSTALLING_UPDATE, |
110 l10n_util::GetString(IDS_PRODUCT_OS_NAME))); | 111 l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME)))); |
111 reboot_label_->SetText(l10n_util::GetString(IDS_INSTALLING_UPDATE_DESC)); | 112 reboot_label_->SetText( |
112 manual_reboot_label_->SetText(l10n_util::GetString(IDS_UPDATE_COMPLETED)); | 113 UTF16ToWide(l10n_util::GetStringUTF16(IDS_INSTALLING_UPDATE_DESC))); |
113 checking_label_->SetText(l10n_util::GetString(IDS_CHECKING_FOR_UPDATES)); | 114 manual_reboot_label_->SetText( |
| 115 UTF16ToWide(l10n_util::GetStringUTF16(IDS_UPDATE_COMPLETED))); |
| 116 checking_label_->SetText( |
| 117 UTF16ToWide(l10n_util::GetStringUTF16(IDS_CHECKING_FOR_UPDATES))); |
114 } | 118 } |
115 | 119 |
116 void UpdateView::AddProgress(int ticks) { | 120 void UpdateView::AddProgress(int ticks) { |
117 progress_bar_->AddProgress(ticks); | 121 progress_bar_->AddProgress(ticks); |
118 } | 122 } |
119 | 123 |
120 void UpdateView::SetProgress(int progress) { | 124 void UpdateView::SetProgress(int progress) { |
121 progress_bar_->SetProgress(progress); | 125 progress_bar_->SetProgress(progress); |
122 } | 126 } |
123 | 127 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 checking_label_->SetVisible(show_curtain_); | 224 checking_label_->SetVisible(show_curtain_); |
221 throbber_->SetVisible(show_curtain_); | 225 throbber_->SetVisible(show_curtain_); |
222 if (show_curtain_) { | 226 if (show_curtain_) { |
223 throbber_->Start(); | 227 throbber_->Start(); |
224 } else { | 228 } else { |
225 throbber_->Stop(); | 229 throbber_->Stop(); |
226 } | 230 } |
227 } | 231 } |
228 | 232 |
229 } // namespace chromeos | 233 } // namespace chromeos |
OLD | NEW |