| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROMEOS_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ |
| 6 #define UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 uint32 cursor_pos, | 105 uint32 cursor_pos, |
| 106 bool visible) override; | 106 bool visible) override; |
| 107 virtual void DeleteSurroundingText(int32 offset, uint32 length) override; | 107 virtual void DeleteSurroundingText(int32 offset, uint32 length) override; |
| 108 | 108 |
| 109 // Hides the composition text. | 109 // Hides the composition text. |
| 110 void HidePreeditText(); | 110 void HidePreeditText(); |
| 111 | 111 |
| 112 // Callback function for IMEEngineHandlerInterface::ProcessKeyEvent. | 112 // Callback function for IMEEngineHandlerInterface::ProcessKeyEvent. |
| 113 void ProcessKeyEventDone(uint32 id, ui::KeyEvent* event, bool is_handled); | 113 void ProcessKeyEventDone(uint32 id, ui::KeyEvent* event, bool is_handled); |
| 114 | 114 |
| 115 // Returns whether an input field is focused. Note that password field is not | 115 // Returns whether an non-password input field is focused. |
| 116 // considered as an input field. | 116 bool IsNonPasswordInputFieldFocused(); |
| 117 |
| 118 // Returns true if an text input field is focused. |
| 117 bool IsInputFieldFocused(); | 119 bool IsInputFieldFocused(); |
| 118 | 120 |
| 119 // All pending key events. Note: we do not own these object, we just save | 121 // All pending key events. Note: we do not own these object, we just save |
| 120 // pointers to these object so that we can abandon them when necessary. | 122 // pointers to these object so that we can abandon them when necessary. |
| 121 // They will be deleted in ProcessKeyEventDone(). | 123 // They will be deleted in ProcessKeyEventDone(). |
| 122 std::set<uint32> pending_key_events_; | 124 std::set<uint32> pending_key_events_; |
| 123 | 125 |
| 124 // Pending composition text generated by the current pending key event. | 126 // Pending composition text generated by the current pending key event. |
| 125 // It'll be sent to the focused text input client as soon as we receive the | 127 // It'll be sent to the focused text input client as soon as we receive the |
| 126 // processing result of the pending key event. | 128 // processing result of the pending key event. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 149 | 151 |
| 150 // Used for making callbacks. | 152 // Used for making callbacks. |
| 151 base::WeakPtrFactory<InputMethodChromeOS> weak_ptr_factory_; | 153 base::WeakPtrFactory<InputMethodChromeOS> weak_ptr_factory_; |
| 152 | 154 |
| 153 DISALLOW_COPY_AND_ASSIGN(InputMethodChromeOS); | 155 DISALLOW_COPY_AND_ASSIGN(InputMethodChromeOS); |
| 154 }; | 156 }; |
| 155 | 157 |
| 156 } // namespace ui | 158 } // namespace ui |
| 157 | 159 |
| 158 #endif // UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ | 160 #endif // UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ |
| OLD | NEW |