OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_KEYBOARD_SWITCH_MENU_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_KEYBOARD_SWITCH_MENU_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_KEYBOARD_SWITCH_MENU_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_KEYBOARD_SWITCH_MENU_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
12 #include "chrome/browser/chromeos/status/input_method_menu_button.h" | 12 #include "chrome/browser/chromeos/status/input_method_menu_button.h" |
13 #include "chrome/browser/chromeos/status/status_area_host.h" | 13 #include "chrome/browser/chromeos/status/status_area_host.h" |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 | 16 |
17 // A class for the button in the OOBE network configuration screen which expands | 17 // A class for the button in the OOBE network configuration screen which expands |
18 // a dropdown menu for switching keyboard layout. Note that the InputMethodMenu | 18 // a dropdown menu for switching keyboard layout. Note that the InputMethodMenu |
19 // class implements the views::ViewMenuDelegate interface. | 19 // class implements the views::ViewMenuDelegate interface. |
20 class KeyboardSwitchMenu : public InputMethodMenu { | 20 class KeyboardSwitchMenu : public InputMethodMenu { |
21 public: | 21 public: |
22 KeyboardSwitchMenu(); | 22 KeyboardSwitchMenu(); |
23 virtual ~KeyboardSwitchMenu() {} | 23 virtual ~KeyboardSwitchMenu() {} |
24 | 24 |
25 // InputMethodMenu::InputMethodMenuHost implementation. | 25 // InputMethodMenu::InputMethodMenuHost implementation. |
26 virtual void UpdateUI( | 26 virtual void UpdateUI(const std::string& input_method_id, |
27 const std::wstring& name, const std::wstring& tooltip); | 27 const std::wstring& name, |
| 28 const std::wstring& tooltip, |
| 29 size_t num_active_input_methods); |
28 virtual bool ShouldSupportConfigUI() { return false; } | 30 virtual bool ShouldSupportConfigUI() { return false; } |
29 virtual void OpenConfigUI() {} | 31 virtual void OpenConfigUI() {} |
30 | 32 |
31 // views::ViewMenuDelegate implementation which overrides the implementation | 33 // views::ViewMenuDelegate implementation which overrides the implementation |
32 // in InputMethodMenu. | 34 // in InputMethodMenu. |
33 virtual void RunMenu(views::View* source, const gfx::Point& pt); | 35 virtual void RunMenu(views::View* source, const gfx::Point& pt); |
34 | 36 |
35 // Returns current keyboard name to be placed on the keyboard menu-button. | 37 // Returns current keyboard name to be placed on the keyboard menu-button. |
36 std::wstring GetCurrentKeyboardName() const; | 38 std::wstring GetCurrentKeyboardName() const; |
37 | 39 |
38 private: | 40 private: |
39 DISALLOW_COPY_AND_ASSIGN(KeyboardSwitchMenu); | 41 DISALLOW_COPY_AND_ASSIGN(KeyboardSwitchMenu); |
40 }; | 42 }; |
41 | 43 |
42 } // namespace chromeos | 44 } // namespace chromeos |
43 | 45 |
44 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_KEYBOARD_SWITCH_MENU_H_ | 46 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_KEYBOARD_SWITCH_MENU_H_ |
OLD | NEW |