| 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 27 matching lines...) Expand all Loading... |
| 38 // internal::InputMethodDelegate::DispatchKeyEventPostIME API, then send | 38 // internal::InputMethodDelegate::DispatchKeyEventPostIME API, then send |
| 39 // a Char event using TextInputClient::InsertChar API to a text input | 39 // a Char event using TextInputClient::InsertChar API to a text input |
| 40 // client, which is, again, e.g. NWA or RWHVA, and then send the original | 40 // client, which is, again, e.g. NWA or RWHVA, and then send the original |
| 41 // key up event to the same window. | 41 // key up event to the same window. |
| 42 // 2) Send VKEY_PROCESSKEY event to the window using the DispatchKeyEvent API, | 42 // 2) Send VKEY_PROCESSKEY event to the window using the DispatchKeyEvent API, |
| 43 // then update IME status (e.g. composition text) using TextInputClient, | 43 // then update IME status (e.g. composition text) using TextInputClient, |
| 44 // and then send the original key up event to the window. | 44 // and then send the original key up event to the window. |
| 45 // - Keeps track of the focused TextInputClient to see which client can call | 45 // - Keeps track of the focused TextInputClient to see which client can call |
| 46 // APIs, OnTextInputTypeChanged, OnCaretBoundsChanged, and CancelComposition, | 46 // APIs, OnTextInputTypeChanged, OnCaretBoundsChanged, and CancelComposition, |
| 47 // that change the state of the input method. | 47 // that change the state of the input method. |
| 48 // In Aura environment, aura::WindowTreeHost creates an instance of | 48 // In Aura environment, aura::RootWindowHost creates an instance of |
| 49 // ui::InputMethod and owns it. | 49 // ui::InputMethod and owns it. |
| 50 class InputMethod { | 50 class InputMethod { |
| 51 public: | 51 public: |
| 52 // TODO(yukawa): Move these typedef into ime_constants.h or somewhere. | 52 // TODO(yukawa): Move these typedef into ime_constants.h or somewhere. |
| 53 #if defined(OS_WIN) | 53 #if defined(OS_WIN) |
| 54 typedef LRESULT NativeEventResult; | 54 typedef LRESULT NativeEventResult; |
| 55 #else | 55 #else |
| 56 typedef int32 NativeEventResult; | 56 typedef int32 NativeEventResult; |
| 57 #endif | 57 #endif |
| 58 | 58 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 virtual bool IsCandidatePopupOpen() const = 0; | 162 virtual bool IsCandidatePopupOpen() const = 0; |
| 163 | 163 |
| 164 // Management of the observer list. | 164 // Management of the observer list. |
| 165 virtual void AddObserver(InputMethodObserver* observer) = 0; | 165 virtual void AddObserver(InputMethodObserver* observer) = 0; |
| 166 virtual void RemoveObserver(InputMethodObserver* observer) = 0; | 166 virtual void RemoveObserver(InputMethodObserver* observer) = 0; |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 } // namespace ui | 169 } // namespace ui |
| 170 | 170 |
| 171 #endif // UI_BASE_IME_INPUT_METHOD_H_ | 171 #endif // UI_BASE_IME_INPUT_METHOD_H_ |
| OLD | NEW |