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 24 matching lines...) Expand all Loading... |
35 // internal::InputMethodDelegate::DispatchKeyEventPostIME API, then send | 35 // internal::InputMethodDelegate::DispatchKeyEventPostIME API, then send |
36 // a Char event using TextInputClient::InsertChar API to a text input | 36 // a Char event using TextInputClient::InsertChar API to a text input |
37 // client, which is, again, e.g. NWA or RWHVA, and then send the original | 37 // client, which is, again, e.g. NWA or RWHVA, and then send the original |
38 // key up event to the same window. | 38 // key up event to the same window. |
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::RootWindowHost 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 // TODO(yukawa): Move these typedef into ime_constants.h or somewhere. |
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 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 virtual bool IsCandidatePopupOpen() const = 0; | 155 virtual bool IsCandidatePopupOpen() const = 0; |
156 | 156 |
157 // Management of the observer list. | 157 // Management of the observer list. |
158 virtual void AddObserver(InputMethodObserver* observer) = 0; | 158 virtual void AddObserver(InputMethodObserver* observer) = 0; |
159 virtual void RemoveObserver(InputMethodObserver* observer) = 0; | 159 virtual void RemoveObserver(InputMethodObserver* observer) = 0; |
160 }; | 160 }; |
161 | 161 |
162 } // namespace ui | 162 } // namespace ui |
163 | 163 |
164 #endif // UI_BASE_IME_INPUT_METHOD_H_ | 164 #endif // UI_BASE_IME_INPUT_METHOD_H_ |
OLD | NEW |