OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/threading/thread_restrictions.h" | 8 #include "base/threading/thread_restrictions.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/chromeos/cros/cros_library.h" | 11 #include "chrome/browser/chromeos/cros/cros_library.h" |
12 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 12 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
13 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 13 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
14 #include "chrome/browser/chromeos/language_preferences.h" | 14 #include "chrome/browser/chromeos/language_preferences.h" |
15 #include "chrome/browser/chromeos/login/language_list.h" | 15 #include "chrome/browser/chromeos/login/language_list.h" |
16 #include "chrome/browser/chromeos/login/ownership_service.h" | 16 #include "chrome/browser/chromeos/login/ownership_service.h" |
17 #include "chrome/browser/chromeos/login/screen_observer.h" | 17 #include "chrome/browser/chromeos/login/screen_observer.h" |
18 #include "chrome/browser/prefs/pref_service.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/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
23 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
24 #include "ui/gfx/platform_font_pango.h" | 24 #include "ui/gfx/platform_font_pango.h" |
| 25 #include "ui/views/widget/widget.h" |
25 #include "views/controls/button/menu_button.h" | 26 #include "views/controls/button/menu_button.h" |
26 #include "views/controls/menu/menu_item_view.h" | 27 #include "views/controls/menu/menu_item_view.h" |
27 #include "views/controls/menu/menu_runner.h" | 28 #include "views/controls/menu/menu_runner.h" |
28 #include "views/controls/menu/submenu_view.h" | 29 #include "views/controls/menu/submenu_view.h" |
29 #include "views/widget/widget.h" | |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 const int kLanguageMainMenuSize = 5; | 33 const int kLanguageMainMenuSize = 5; |
34 // TODO(glotov): need to specify the list as a part of the image customization. | 34 // TODO(glotov): need to specify the list as a part of the image customization. |
35 const char kLanguagesTopped[] = "es,it,de,fr,en-US"; | 35 const char kLanguagesTopped[] = "es,it,de,fr,en-US"; |
36 const int kMoreLanguagesSubMenu = 200; | 36 const int kMoreLanguagesSubMenu = 200; |
37 | 37 |
38 } // namespace | 38 } // namespace |
39 | 39 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 // Here, we should enable keyboard layouts associated with the locale so | 201 // Here, we should enable keyboard layouts associated with the locale so |
202 // that users can use those keyboard layouts on the login screen. | 202 // that users can use those keyboard layouts on the login screen. |
203 SwitchLanguageAndEnableKeyboardLayouts(locale); | 203 SwitchLanguageAndEnableKeyboardLayouts(locale); |
204 InitLanguageMenu(); | 204 InitLanguageMenu(); |
205 | 205 |
206 // Update all view hierarchies that the locale has changed. | 206 // Update all view hierarchies that the locale has changed. |
207 views::Widget::NotifyLocaleChanged(); | 207 views::Widget::NotifyLocaleChanged(); |
208 } | 208 } |
209 | 209 |
210 } // namespace chromeos | 210 } // namespace chromeos |
OLD | NEW |