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_TEXT_INPUT_CLIENT_H_ | 5 #ifndef UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
6 #define UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 6 #define UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 // instead of calling DeleteRange with GetSelectionRange, because | 152 // instead of calling DeleteRange with GetSelectionRange, because |
153 // GetSelectionRange may not be the latest value due to asynchronous of IPC | 153 // GetSelectionRange may not be the latest value due to asynchronous of IPC |
154 // between browser and renderer. | 154 // between browser and renderer. |
155 virtual void ExtendSelectionAndDelete(size_t before, size_t after) = 0; | 155 virtual void ExtendSelectionAndDelete(size_t before, size_t after) = 0; |
156 | 156 |
157 // Ensure the caret is not in |rect|. |rect| is in screen coordinates in | 157 // Ensure the caret is not in |rect|. |rect| is in screen coordinates in |
158 // DIP (Density Independent Pixel) and may extend beyond the bounds of this | 158 // DIP (Density Independent Pixel) and may extend beyond the bounds of this |
159 // TextInputClient. | 159 // TextInputClient. |
160 virtual void EnsureCaretNotInRect(const gfx::Rect& rect) = 0; | 160 virtual void EnsureCaretNotInRect(const gfx::Rect& rect) = 0; |
161 | 161 |
162 // Called when this input client is no longer focused. Used to restore window | |
163 // bounds when moved by accessibility virtual keyboard. | |
164 virtual void OnClientFocusLost() {} | |
Shu Chen
2017/03/14 14:42:30
Why adding this? RWHVA is a FocusChangeObserver an
yhanada
2017/03/15 12:54:32
This will also be called when VK size is changed f
| |
165 | |
162 // Returns true if |command| is currently allowed to be executed. | 166 // Returns true if |command| is currently allowed to be executed. |
163 virtual bool IsTextEditCommandEnabled(TextEditCommand command) const = 0; | 167 virtual bool IsTextEditCommandEnabled(TextEditCommand command) const = 0; |
164 | 168 |
165 // Execute |command| on the next key event. This allows a TextInputClient to | 169 // Execute |command| on the next key event. This allows a TextInputClient to |
166 // be informed of a platform-independent edit command that has been derived | 170 // be informed of a platform-independent edit command that has been derived |
167 // from the key event currently being dispatched (but not yet sent to the | 171 // from the key event currently being dispatched (but not yet sent to the |
168 // TextInputClient). The edit command will take into account any OS-specific, | 172 // TextInputClient). The edit command will take into account any OS-specific, |
169 // or user-specified, keybindings that may be set up. | 173 // or user-specified, keybindings that may be set up. |
170 virtual void SetTextEditCommandForNextKeyEvent(TextEditCommand command) = 0; | 174 virtual void SetTextEditCommandForNextKeyEvent(TextEditCommand command) = 0; |
171 }; | 175 }; |
172 | 176 |
173 } // namespace ui | 177 } // namespace ui |
174 | 178 |
175 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 179 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
OLD | NEW |