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 UI_BASE_IME_INPUT_METHOD_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_H_ |
6 #define UI_BASE_IME_INPUT_METHOD_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // 2) Send VKEY_PROCESSKEY event to the window using the DispatchKeyEvent API, | 39 // 2) Send VKEY_PROCESSKEY event to the window using the DispatchKeyEvent API, |
40 // then update IME status (e.g. composition text) using TextInputClient, | 40 // then update IME status (e.g. composition text) using TextInputClient, |
41 // and then send the original key up event to the window. | 41 // and then send the original key up event to the window. |
42 // - Keeps track of the focused TextInputClient to see which client can call | 42 // - Keeps track of the focused TextInputClient to see which client can call |
43 // APIs, OnTextInputTypeChanged, OnCaretBoundsChanged, and CancelComposition, | 43 // APIs, OnTextInputTypeChanged, OnCaretBoundsChanged, and CancelComposition, |
44 // that change the state of the input method. | 44 // that change the state of the input method. |
45 // In Aura environment, aura::WindowTreeHost creates an instance of | 45 // In Aura environment, aura::WindowTreeHost creates an instance of |
46 // ui::InputMethod and owns it. | 46 // ui::InputMethod and owns it. |
47 class InputMethod { | 47 class InputMethod { |
48 public: | 48 public: |
49 // TODO(yukawa): Move these typedef into ime_constants.h or somewhere. | 49 |
50 #if defined(OS_WIN) | 50 #if defined(OS_WIN) |
51 typedef LRESULT NativeEventResult; | 51 typedef LRESULT NativeEventResult; |
52 #else | 52 #else |
53 typedef int32 NativeEventResult; | 53 typedef int32 NativeEventResult; |
54 #endif | 54 #endif |
55 | 55 |
56 virtual ~InputMethod() {} | 56 virtual ~InputMethod() {} |
57 | 57 |
58 // Sets the delegate used by this InputMethod instance. It should only be | 58 // Sets the delegate used by this InputMethod instance. It should only be |
59 // called by an object which manages the whole UI. | 59 // called by an object which manages the whole UI. |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 virtual void ShowImeIfNeeded() = 0; | 158 virtual void ShowImeIfNeeded() = 0; |
159 | 159 |
160 // Management of the observer list. | 160 // Management of the observer list. |
161 virtual void AddObserver(InputMethodObserver* observer) = 0; | 161 virtual void AddObserver(InputMethodObserver* observer) = 0; |
162 virtual void RemoveObserver(InputMethodObserver* observer) = 0; | 162 virtual void RemoveObserver(InputMethodObserver* observer) = 0; |
163 }; | 163 }; |
164 | 164 |
165 } // namespace ui | 165 } // namespace ui |
166 | 166 |
167 #endif // UI_BASE_IME_INPUT_METHOD_H_ | 167 #endif // UI_BASE_IME_INPUT_METHOD_H_ |
OLD | NEW |