Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 736001: Update screen view is reset while language is switched. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698