| 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 CHROMEOS_IME_INPUT_METHOD_MANAGER_H_ | 5 #ifndef CHROMEOS_IME_INPUT_METHOD_MANAGER_H_ |
| 6 #define CHROMEOS_IME_INPUT_METHOD_MANAGER_H_ | 6 #define CHROMEOS_IME_INPUT_METHOD_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "chromeos/chromeos_export.h" | 13 #include "chromeos/chromeos_export.h" |
| 14 #include "chromeos/ime/input_method_descriptor.h" | 14 #include "chromeos/ime/input_method_descriptor.h" |
| 15 #include "chromeos/ime/input_method_property.h" | 15 #include "chromeos/ime/input_method_property.h" |
| 16 | 16 |
| 17 namespace ui { | 17 namespace ui { |
| 18 class Accelerator; | 18 class Accelerator; |
| 19 } // namespace ui | 19 } // namespace ui |
| 20 | 20 |
| 21 namespace chromeos { | 21 namespace chromeos { |
| 22 class ComponentExtensionIMEManager; | 22 class ComponentExtensionIMEManager; |
| 23 class InputMethodEngineInterface; | 23 class InputMethodEngineInterface; |
| 24 namespace input_method { | 24 namespace input_method { |
| 25 | |
| 26 class InputMethodUtil; | 25 class InputMethodUtil; |
| 27 class XKeyboard; | 26 class XKeyboard; |
| 28 | 27 |
| 29 // This class manages input methodshandles. Classes can add themselves as | 28 // This class manages input methodshandles. Classes can add themselves as |
| 30 // observers. Clients can get an instance of this library class by: | 29 // observers. Clients can get an instance of this library class by: |
| 31 // InputMethodManager::Get(). | 30 // InputMethodManager::Get(). |
| 32 class CHROMEOS_EXPORT InputMethodManager { | 31 class CHROMEOS_EXPORT InputMethodManager { |
| 33 public: | 32 public: |
| 34 enum State { | 33 enum State { |
| 35 STATE_LOGIN_SCREEN = 0, | 34 STATE_LOGIN_SCREEN = 0, |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 const std::vector<std::string>& new_active_input_method_ids) = 0; | 129 const std::vector<std::string>& new_active_input_method_ids) = 0; |
| 131 | 130 |
| 132 // Adds one entry to the list of active input method IDs, and then starts or | 131 // Adds one entry to the list of active input method IDs, and then starts or |
| 133 // stops the system input method framework as needed. | 132 // stops the system input method framework as needed. |
| 134 virtual bool EnableInputMethod( | 133 virtual bool EnableInputMethod( |
| 135 const std::string& new_active_input_method_id) = 0; | 134 const std::string& new_active_input_method_id) = 0; |
| 136 | 135 |
| 137 // Adds an input method extension. This function does not takes ownership of | 136 // Adds an input method extension. This function does not takes ownership of |
| 138 // |instance|. | 137 // |instance|. |
| 139 virtual void AddInputMethodExtension( | 138 virtual void AddInputMethodExtension( |
| 140 const std::string& id, | 139 const std::string& imm_id, |
| 141 const std::string& name, | |
| 142 const std::vector<std::string>& layouts, | |
| 143 const std::vector<std::string>& languages, | |
| 144 const GURL& options_url, | |
| 145 const GURL& inputview_url, | |
| 146 InputMethodEngineInterface* instance) = 0; | 140 InputMethodEngineInterface* instance) = 0; |
| 147 | 141 |
| 148 // Removes an input method extension. | 142 // Removes an input method extension. |
| 149 virtual void RemoveInputMethodExtension(const std::string& id) = 0; | 143 virtual void RemoveInputMethodExtension(const std::string& id) = 0; |
| 150 | 144 |
| 151 // Returns a list of descriptors for all Input Method Extensions. | 145 // Returns a list of descriptors for all Input Method Extensions. |
| 152 virtual void GetInputMethodExtensions(InputMethodDescriptors* result) = 0; | 146 virtual void GetInputMethodExtensions(InputMethodDescriptors* result) = 0; |
| 153 | 147 |
| 154 // Sets the list of extension IME ids which should be enabled. | 148 // Sets the list of extension IME ids which should be enabled. |
| 155 virtual void SetEnabledExtensionImes(std::vector<std::string>* ids) = 0; | 149 virtual void SetEnabledExtensionImes(std::vector<std::string>* ids) = 0; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) = 0; | 183 virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) = 0; |
| 190 | 184 |
| 191 // If keyboard layout can be uset at login screen | 185 // If keyboard layout can be uset at login screen |
| 192 virtual bool IsLoginKeyboard(const std::string& layout) const = 0; | 186 virtual bool IsLoginKeyboard(const std::string& layout) const = 0; |
| 193 }; | 187 }; |
| 194 | 188 |
| 195 } // namespace input_method | 189 } // namespace input_method |
| 196 } // namespace chromeos | 190 } // namespace chromeos |
| 197 | 191 |
| 198 #endif // CHROMEOS_IME_INPUT_METHOD_MANAGER_H_ | 192 #endif // CHROMEOS_IME_INPUT_METHOD_MANAGER_H_ |
| OLD | NEW |