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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc

Issue 880313002: webui: add [lang] attribute to <html> element on all webui pages so (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cros Created 5 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/chromeos/login/oobe_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 core_handler_->UpdateShutdownAndRebootVisibility(reboot_on_shutdown); 490 core_handler_->UpdateShutdownAndRebootVisibility(reboot_on_shutdown);
491 } 491 }
492 492
493 AppLaunchSplashScreenActor* 493 AppLaunchSplashScreenActor*
494 OobeUI::GetAppLaunchSplashScreenActor() { 494 OobeUI::GetAppLaunchSplashScreenActor() {
495 return app_launch_splash_screen_actor_; 495 return app_launch_splash_screen_actor_;
496 } 496 }
497 497
498 void OobeUI::GetLocalizedStrings(base::DictionaryValue* localized_strings) { 498 void OobeUI::GetLocalizedStrings(base::DictionaryValue* localized_strings) {
499 // Note, handlers_[0] is a GenericHandler used by the WebUI. 499 // Note, handlers_[0] is a GenericHandler used by the WebUI.
500 for (size_t i = 0; i < handlers_.size(); ++i) 500 for (size_t i = 0; i < handlers_.size(); ++i) {
501 handlers_[i]->GetLocalizedStrings(localized_strings); 501 handlers_[i]->GetLocalizedStrings(localized_strings);
502 webui::SetFontAndTextDirection(localized_strings); 502 }
503 const std::string& app_locale = g_browser_process->GetApplicationLocale();
504 webui::SetLoadTimeDataDefaults(app_locale, localized_strings);
503 kiosk_app_menu_handler_->GetLocalizedStrings(localized_strings); 505 kiosk_app_menu_handler_->GetLocalizedStrings(localized_strings);
504 506
505 #if defined(GOOGLE_CHROME_BUILD) 507 #if defined(GOOGLE_CHROME_BUILD)
506 localized_strings->SetString("buildType", "chrome"); 508 localized_strings->SetString("buildType", "chrome");
507 #else 509 #else
508 localized_strings->SetString("buildType", "chromium"); 510 localized_strings->SetString("buildType", "chromium");
509 #endif 511 #endif
510 512
511 // If we're not doing boot animation then WebUI should trigger 513 // If we're not doing boot animation then WebUI should trigger
512 // wallpaper load on boot. 514 // wallpaper load on boot.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 DCHECK(screen_ids_.count(screen)) 653 DCHECK(screen_ids_.count(screen))
652 << "Screen should be registered in InitializeScreenMaps()"; 654 << "Screen should be registered in InitializeScreenMaps()";
653 Screen new_screen = screen_ids_[screen]; 655 Screen new_screen = screen_ids_[screen];
654 FOR_EACH_OBSERVER(Observer, 656 FOR_EACH_OBSERVER(Observer,
655 observer_list_, 657 observer_list_,
656 OnCurrentScreenChanged(current_screen_, new_screen)); 658 OnCurrentScreenChanged(current_screen_, new_screen));
657 current_screen_ = new_screen; 659 current_screen_ = new_screen;
658 } 660 }
659 661
660 } // namespace chromeos 662 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc ('k') | chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698