| 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_LANGUAGE_MENU_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_LANGUAGE_MENU_BUTTON_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_STATUS_LANGUAGE_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_CHROMEOS_STATUS_LANGUAGE_MENU_BUTTON_H_ |
| 7 | 7 |
| 8 #include "app/menus/simple_menu_model.h" | 8 #include "app/menus/simple_menu_model.h" |
| 9 #include "chrome/browser/chromeos/cros/input_method_library.h" | 9 #include "chrome/browser/chromeos/cros/input_method_library.h" |
| 10 #include "chrome/browser/chromeos/status/status_area_button.h" | 10 #include "chrome/browser/chromeos/status/status_area_button.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // Converts an InputMethodDescriptor object into human readable string. | 70 // Converts an InputMethodDescriptor object into human readable string. |
| 71 // Returns a string for the drop-down menu and the tooltip for the indicator. | 71 // Returns a string for the drop-down menu and the tooltip for the indicator. |
| 72 static std::wstring GetTextForMenu( | 72 static std::wstring GetTextForMenu( |
| 73 const InputMethodDescriptor& input_method, bool add_method_name); | 73 const InputMethodDescriptor& input_method, bool add_method_name); |
| 74 | 74 |
| 75 // Registers input method preferences for the login screen. | 75 // Registers input method preferences for the login screen. |
| 76 static void RegisterPrefs(PrefService* local_state); | 76 static void RegisterPrefs(PrefService* local_state); |
| 77 | 77 |
| 78 protected: | 78 protected: |
| 79 // views::View implementation. | 79 // views::View implementation. |
| 80 virtual void LocaleChanged(); | 80 virtual void OnLocaleChanged(); |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 // views::ViewMenuDelegate implementation. | 83 // views::ViewMenuDelegate implementation. |
| 84 virtual void RunMenu(views::View* source, const gfx::Point& pt); | 84 virtual void RunMenu(views::View* source, const gfx::Point& pt); |
| 85 | 85 |
| 86 // Updates the status area with |name| and tooltip with |tooltip|. | 86 // Updates the status area with |name| and tooltip with |tooltip|. |
| 87 void UpdateIndicator(const std::wstring& name, const std::wstring& tooltip); | 87 void UpdateIndicator(const std::wstring& name, const std::wstring& tooltip); |
| 88 | 88 |
| 89 // Updates the status area from the given input method. | 89 // Updates the status area from the given input method. |
| 90 void UpdateIndicatorFromInputMethod( | 90 void UpdateIndicatorFromInputMethod( |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 StatusAreaHost* host_; | 128 StatusAreaHost* host_; |
| 129 NotificationRegistrar registrar_; | 129 NotificationRegistrar registrar_; |
| 130 bool logged_in_; | 130 bool logged_in_; |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(LanguageMenuButton); | 132 DISALLOW_COPY_AND_ASSIGN(LanguageMenuButton); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 } // namespace chromeos | 135 } // namespace chromeos |
| 136 | 136 |
| 137 #endif // CHROME_BROWSER_CHROMEOS_STATUS_LANGUAGE_MENU_BUTTON_H_ | 137 #endif // CHROME_BROWSER_CHROMEOS_STATUS_LANGUAGE_MENU_BUTTON_H_ |
| OLD | NEW |