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/keyboard_switch_menu.h" | 5 #include "chrome/browser/chromeos/login/keyboard_switch_menu.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 9 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
10 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 10 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
11 #include "chrome/browser/chromeos/status/status_area_host.h" | 11 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h" |
12 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
13 #include "ui/base/l10n/l10n_util.h" | 13 #include "ui/base/l10n/l10n_util.h" |
14 #include "views/controls/button/menu_button.h" | 14 #include "views/controls/button/menu_button.h" |
15 #include "views/widget/widget.h" | 15 #include "views/widget/widget.h" |
16 | 16 |
17 namespace chromeos { | 17 namespace chromeos { |
18 | 18 |
19 KeyboardSwitchMenu::KeyboardSwitchMenu() | 19 KeyboardSwitchMenu::KeyboardSwitchMenu() |
20 : InputMethodMenu(NULL /* pref_service */, | 20 : InputMethodMenu(NULL /* pref_service */, |
21 StatusAreaHost::kViewsLoginMode, | 21 StatusAreaViewChromeos::LOGIN_MODE_VIEWS, |
22 true /* for_out_of_box_experience_dialog */) { | 22 true /* for_out_of_box_experience_dialog */) { |
23 } | 23 } |
24 | 24 |
25 //////////////////////////////////////////////////////////////////////////////// | 25 //////////////////////////////////////////////////////////////////////////////// |
26 // InputMethodMenu::InputMethodMenuHost implementation. | 26 // InputMethodMenu::InputMethodMenuHost implementation. |
27 void KeyboardSwitchMenu::UpdateUI(const std::string& input_method_id, | 27 void KeyboardSwitchMenu::UpdateUI(const std::string& input_method_id, |
28 const string16& name, | 28 const string16& name, |
29 const string16& tooltip, | 29 const string16& tooltip, |
30 size_t num_active_input_methods) { | 30 size_t num_active_input_methods) { |
31 // Update all view hierarchies so that the new input method name is shown in | 31 // Update all view hierarchies so that the new input method name is shown in |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 VLOG(1) << "The input method menu is not ready yet. Show the display " | 65 VLOG(1) << "The input method menu is not ready yet. Show the display " |
66 << "name of the current input method"; | 66 << "name of the current input method"; |
67 input_method::InputMethodManager* manager = | 67 input_method::InputMethodManager* manager = |
68 input_method::InputMethodManager::GetInstance(); | 68 input_method::InputMethodManager::GetInstance(); |
69 return UTF8ToUTF16( | 69 return UTF8ToUTF16( |
70 manager->GetInputMethodUtil()->GetInputMethodDisplayNameFromId( | 70 manager->GetInputMethodUtil()->GetInputMethodDisplayNameFromId( |
71 manager->current_input_method().id())); | 71 manager->current_input_method().id())); |
72 } | 72 } |
73 | 73 |
74 } // namespace chromeos | 74 } // namespace chromeos |
OLD | NEW |