| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_INPUT_METHOD_EVENT_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_EVENT_ROUTER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_EVENT_ROUTER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_EVENT_ROUTER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 9 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 10 | 10 |
| 11 namespace chromeos { | 11 namespace chromeos { |
| 12 | 12 |
| 13 // Event router class for the input method events. | 13 // Event router class for the input method events. |
| 14 class ExtensionInputMethodEventRouter | 14 class ExtensionInputMethodEventRouter |
| 15 : public input_method::InputMethodManager::Observer { | 15 : public input_method::InputMethodManager::Observer { |
| 16 public: | 16 public: |
| 17 ExtensionInputMethodEventRouter(); | 17 ExtensionInputMethodEventRouter(); |
| 18 virtual ~ExtensionInputMethodEventRouter(); | 18 virtual ~ExtensionInputMethodEventRouter(); |
| 19 | 19 |
| 20 // Implements input_method::InputMethodManager::Observer: | 20 // Implements input_method::InputMethodManager::Observer: |
| 21 virtual void InputMethodChanged( | 21 virtual void InputMethodChanged( |
| 22 input_method::InputMethodManager* manager, | 22 input_method::InputMethodManager* manager) OVERRIDE; |
| 23 const input_method::InputMethodDescriptor& current_input_method, | 23 virtual void InputMethodPropertyChanged( |
| 24 size_t num_active_input_methods) OVERRIDE; | 24 input_method::InputMethodManager* manager) OVERRIDE {} |
| 25 virtual void ActiveInputMethodsChanged( | |
| 26 input_method::InputMethodManager* manager, | |
| 27 const input_method::InputMethodDescriptor& current_input_method, | |
| 28 size_t num_active_input_methods) OVERRIDE; | |
| 29 virtual void PropertyListChanged( | |
| 30 input_method::InputMethodManager* manager, | |
| 31 const input_method::InputMethodPropertyList& properties) OVERRIDE; | |
| 32 | 25 |
| 33 // Returns input method name for the given XKB (X keyboard extensions in X | 26 // Returns input method name for the given XKB (X keyboard extensions in X |
| 34 // Window System) id. | 27 // Window System) id. |
| 35 std::string GetInputMethodForXkb(const std::string& xkb_id); | 28 std::string GetInputMethodForXkb(const std::string& xkb_id); |
| 36 | 29 |
| 37 private: | 30 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(ExtensionInputMethodEventRouter); | 31 DISALLOW_COPY_AND_ASSIGN(ExtensionInputMethodEventRouter); |
| 39 }; | 32 }; |
| 40 | 33 |
| 41 } // namespace chromeos | 34 } // namespace chromeos |
| 42 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_EVENT_ROUTER_H_ | 35 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_EVENT_ROUTER_H_ |
| OLD | NEW |