| OLD | NEW |
| 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/chromeos/login/language_switch_menu.h" | 5 #include "chrome/browser/chromeos/login/language_switch_menu.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
| 9 #include "base/threading/thread_restrictions.h" | 9 #include "base/threading/thread_restrictions.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/chromeos/cros/cros_library.h" | 12 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 13 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 13 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 14 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 14 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 15 #include "chrome/browser/chromeos/language_preferences.h" | |
| 16 #include "chrome/browser/chromeos/login/language_list.h" | 15 #include "chrome/browser/chromeos/login/language_list.h" |
| 17 #include "chrome/browser/chromeos/login/ownership_service.h" | 16 #include "chrome/browser/chromeos/login/ownership_service.h" |
| 18 #include "chrome/browser/chromeos/login/screen_observer.h" | 17 #include "chrome/browser/chromeos/login/screen_observer.h" |
| 19 #include "chrome/browser/prefs/pref_service.h" | 18 #include "chrome/browser/prefs/pref_service.h" |
| 20 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
| 21 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
| 22 #include "grit/platform_locale_settings.h" | 21 #include "grit/platform_locale_settings.h" |
| 23 #include "ui/aura/root_window.h" | 22 #include "ui/aura/root_window.h" |
| 24 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
| 25 #include "ui/base/resource/resource_bundle.h" | 24 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 void LanguageSwitchMenu::ExecuteCommand(int command_id) { | 195 void LanguageSwitchMenu::ExecuteCommand(int command_id) { |
| 197 const std::string locale = language_list_->GetLocaleFromIndex(command_id); | 196 const std::string locale = language_list_->GetLocaleFromIndex(command_id); |
| 198 // Here, we should enable keyboard layouts associated with the locale so | 197 // Here, we should enable keyboard layouts associated with the locale so |
| 199 // that users can use those keyboard layouts on the login screen. | 198 // that users can use those keyboard layouts on the login screen. |
| 200 SwitchLanguageAndEnableKeyboardLayouts(locale); | 199 SwitchLanguageAndEnableKeyboardLayouts(locale); |
| 201 InitLanguageMenu(); | 200 InitLanguageMenu(); |
| 202 NotifyLocaleChanged(ash::Shell::GetRootWindow()); | 201 NotifyLocaleChanged(ash::Shell::GetRootWindow()); |
| 203 } | 202 } |
| 204 | 203 |
| 205 } // namespace chromeos | 204 } // namespace chromeos |
| OLD | NEW |