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/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "app/gfx/canvas.h" | 10 #include "app/gfx/canvas.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 update_screen_.reset(new UpdateScreen(this)); | 172 update_screen_.reset(new UpdateScreen(this)); |
173 return update_screen_.get(); | 173 return update_screen_.get(); |
174 } | 174 } |
175 | 175 |
176 void WizardController::OnSwitchLanguage(std::string lang) { | 176 void WizardController::OnSwitchLanguage(std::string lang) { |
177 // Delete all views that may may reference locale-specific data. | 177 // Delete all views that may may reference locale-specific data. |
178 SetCurrentScreen(NULL); | 178 SetCurrentScreen(NULL); |
179 network_screen_.reset(); | 179 network_screen_.reset(); |
180 login_screen_.reset(); | 180 login_screen_.reset(); |
181 account_screen_.reset(); | 181 account_screen_.reset(); |
| 182 update_screen_.reset(); |
182 contents_->RemoveAllChildViews(true); | 183 contents_->RemoveAllChildViews(true); |
183 | 184 |
184 // Switch the locale. | 185 // Switch the locale. |
185 ResourceBundle::CleanupSharedInstance(); | 186 ResourceBundle::CleanupSharedInstance(); |
186 icu::Locale icu_locale(lang.c_str()); | 187 icu::Locale icu_locale(lang.c_str()); |
187 UErrorCode error_code = U_ZERO_ERROR; | 188 UErrorCode error_code = U_ZERO_ERROR; |
188 icu::Locale::setDefault(icu_locale, error_code); | 189 icu::Locale::setDefault(icu_locale, error_code); |
189 DCHECK(U_SUCCESS(error_code)); | 190 DCHECK(U_SUCCESS(error_code)); |
190 ResourceBundle::InitSharedInstance(UTF8ToWide(lang)); | 191 ResourceBundle::InitSharedInstance(UTF8ToWide(lang)); |
191 | 192 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 return contents_; | 269 return contents_; |
269 } | 270 } |
270 | 271 |
271 views::Window* WizardController::GetWizardWindow() { | 272 views::Window* WizardController::GetWizardWindow() { |
272 return window(); | 273 return window(); |
273 } | 274 } |
274 | 275 |
275 chromeos::ScreenObserver* WizardController::GetObserver(WizardScreen* screen) { | 276 chromeos::ScreenObserver* WizardController::GetObserver(WizardScreen* screen) { |
276 return this; | 277 return this; |
277 } | 278 } |
OLD | NEW |