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_STATUS_INPUT_METHOD_MENU_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_INPUT_METHOD_MENU_BUTTON_H_ |
6 #define CHROME_BROWSER_CHROMEOS_STATUS_INPUT_METHOD_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_CHROMEOS_STATUS_INPUT_METHOD_MENU_BUTTON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "chrome/browser/chromeos/status/input_method_menu.h" | 11 #include "chrome/browser/chromeos/status/input_method_menu.h" |
12 #include "chrome/browser/chromeos/status/status_area_button.h" | 12 #include "chrome/browser/chromeos/status/status_area_button.h" |
13 | 13 |
14 namespace chromeos { | 14 namespace chromeos { |
15 | 15 |
16 class StatusAreaHost; | 16 class StatusAreaHost; |
17 | 17 |
18 // A class for the button in the status area which expands the dropdown menu for | 18 // A class for the button in the status area which expands the dropdown menu for |
19 // switching input method and keyboard layout. | 19 // switching input method and keyboard layout. |
20 class InputMethodMenuButton : public StatusAreaButton, | 20 class InputMethodMenuButton : public StatusAreaButton, |
21 public InputMethodMenu { | 21 public InputMethodMenu { |
22 public: | 22 public: |
23 explicit InputMethodMenuButton(StatusAreaHost* host); | 23 explicit InputMethodMenuButton(StatusAreaHost* host); |
24 virtual ~InputMethodMenuButton() {} | 24 virtual ~InputMethodMenuButton() {} |
25 | 25 |
26 // views::View implementation. | 26 // views::View implementation. |
| 27 virtual gfx::Size GetPreferredSize(); |
27 virtual void OnLocaleChanged(); | 28 virtual void OnLocaleChanged(); |
28 | 29 |
29 private: | 30 private: |
30 // InputMethodMenu implementation. | 31 // InputMethodMenu implementation. |
31 virtual void UpdateUI( | 32 virtual void UpdateUI( |
32 const std::wstring& name, const std::wstring& tooltip); | 33 const std::wstring& name, const std::wstring& tooltip); |
33 virtual bool ShouldSupportConfigUI(); | 34 virtual bool ShouldSupportConfigUI(); |
34 virtual void OpenConfigUI(); | 35 virtual void OpenConfigUI(); |
35 | 36 |
36 StatusAreaHost* host_; | 37 StatusAreaHost* host_; |
37 | 38 |
38 DISALLOW_COPY_AND_ASSIGN(InputMethodMenuButton); | 39 DISALLOW_COPY_AND_ASSIGN(InputMethodMenuButton); |
39 }; | 40 }; |
40 | 41 |
41 } // namespace chromeos | 42 } // namespace chromeos |
42 | 43 |
43 #endif // CHROME_BROWSER_CHROMEOS_STATUS_INPUT_METHOD_MENU_BUTTON_H_ | 44 #endif // CHROME_BROWSER_CHROMEOS_STATUS_INPUT_METHOD_MENU_BUTTON_H_ |
OLD | NEW |