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