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 | 15 |
16 namespace ui { | 16 namespace ui { |
17 class Accelerator; | 17 class Accelerator; |
18 } // namespace ui | 18 } // namespace ui |
19 | 19 |
20 namespace chromeos { | 20 namespace chromeos { |
21 class ComponentExtensionIMEManager; | 21 class ComponentExtensionIMEManager; |
22 class InputMethodEngineInterface; | 22 class InputMethodEngineInterface; |
23 namespace input_method { | 23 namespace input_method { |
24 class InputMethodUtil; | 24 class InputMethodUtil; |
25 class XKeyboard; | 25 class ImeKeyboard; |
26 | 26 |
27 // This class manages input methodshandles. Classes can add themselves as | 27 // This class manages input methodshandles. Classes can add themselves as |
28 // observers. Clients can get an instance of this library class by: | 28 // observers. Clients can get an instance of this library class by: |
29 // InputMethodManager::Get(). | 29 // InputMethodManager::Get(). |
30 class CHROMEOS_EXPORT InputMethodManager { | 30 class CHROMEOS_EXPORT InputMethodManager { |
31 public: | 31 public: |
32 enum State { | 32 enum State { |
33 STATE_LOGIN_SCREEN = 0, | 33 STATE_LOGIN_SCREEN = 0, |
34 STATE_BROWSER_SCREEN, | 34 STATE_BROWSER_SCREEN, |
35 STATE_LOCK_SCREEN, | 35 STATE_LOCK_SCREEN, |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 // Gets the descriptor of the input method which is currently selected. | 157 // Gets the descriptor of the input method which is currently selected. |
158 virtual InputMethodDescriptor GetCurrentInputMethod() const = 0; | 158 virtual InputMethodDescriptor GetCurrentInputMethod() const = 0; |
159 | 159 |
160 virtual bool IsISOLevel5ShiftUsedByCurrentInputMethod() const = 0; | 160 virtual bool IsISOLevel5ShiftUsedByCurrentInputMethod() const = 0; |
161 | 161 |
162 virtual bool IsAltGrUsedByCurrentInputMethod() const = 0; | 162 virtual bool IsAltGrUsedByCurrentInputMethod() const = 0; |
163 | 163 |
164 // Returns an X keyboard object which could be used to change the current XKB | 164 // Returns an X keyboard object which could be used to change the current XKB |
165 // layout, change the caps lock status, and set the auto repeat rate/interval. | 165 // layout, change the caps lock status, and set the auto repeat rate/interval. |
166 virtual XKeyboard* GetXKeyboard() = 0; | 166 virtual ImeKeyboard* GetImeKeyboard() = 0; |
167 | 167 |
168 // Returns an InputMethodUtil object. | 168 // Returns an InputMethodUtil object. |
169 virtual InputMethodUtil* GetInputMethodUtil() = 0; | 169 virtual InputMethodUtil* GetInputMethodUtil() = 0; |
170 | 170 |
171 // Returns a ComponentExtentionIMEManager object. | 171 // Returns a ComponentExtentionIMEManager object. |
172 virtual ComponentExtensionIMEManager* GetComponentExtensionIMEManager() = 0; | 172 virtual ComponentExtensionIMEManager* GetComponentExtensionIMEManager() = 0; |
173 | 173 |
174 // Switches the current input method (or keyboard layout) to the next one. | 174 // Switches the current input method (or keyboard layout) to the next one. |
175 virtual bool SwitchToNextInputMethod() = 0; | 175 virtual bool SwitchToNextInputMethod() = 0; |
176 | 176 |
(...skipping 12 matching lines...) Expand all Loading... |
189 // TODO(shuchen): Remove this function after few milestones are passed. | 189 // TODO(shuchen): Remove this function after few milestones are passed. |
190 // See: http://crbug.com/345604 | 190 // See: http://crbug.com/345604 |
191 virtual bool MigrateXkbInputMethods( | 191 virtual bool MigrateXkbInputMethods( |
192 std::vector<std::string>* input_method_ids) = 0; | 192 std::vector<std::string>* input_method_ids) = 0; |
193 }; | 193 }; |
194 | 194 |
195 } // namespace input_method | 195 } // namespace input_method |
196 } // namespace chromeos | 196 } // namespace chromeos |
197 | 197 |
198 #endif // CHROMEOS_IME_INPUT_METHOD_MANAGER_H_ | 198 #endif // CHROMEOS_IME_INPUT_METHOD_MANAGER_H_ |
OLD | NEW |