| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 virtual void ExtendSelectionAndDelete(size_t before, size_t after) = 0; | 163 virtual void ExtendSelectionAndDelete(size_t before, size_t after) = 0; |
| 164 | 164 |
| 165 // Ensure the caret is out of |rect|. |rect| is in screen coordinates and | 165 // Ensure the caret is out of |rect|. |rect| is in screen coordinates and |
| 166 // may extend beyond the bounds of this TextInputClient. | 166 // may extend beyond the bounds of this TextInputClient. |
| 167 // Note: On Windows, the returned value is supposed to be DIP (Density | 167 // Note: On Windows, the returned value is supposed to be DIP (Density |
| 168 // Independent Pixel). | 168 // Independent Pixel). |
| 169 // TODO(ime): Have a clear spec whether the returned value is DIP or not. | 169 // TODO(ime): Have a clear spec whether the returned value is DIP or not. |
| 170 // http://crbug.com/360334 | 170 // http://crbug.com/360334 |
| 171 virtual void EnsureCaretOutOfRect(const gfx::Rect& rect) = 0; | 171 virtual void EnsureCaretOutOfRect(const gfx::Rect& rect) = 0; |
| 172 | 172 |
| 173 // Called when this input client is no longer focused. Used to restore window |
| 174 // bounds when moved by accessibility virtual keyboard. |
| 175 virtual void OnClientFocusLost() {} |
| 176 |
| 173 // Returns true if |command| is currently allowed to be executed. | 177 // Returns true if |command| is currently allowed to be executed. |
| 174 virtual bool IsTextEditCommandEnabled(TextEditCommand command) const = 0; | 178 virtual bool IsTextEditCommandEnabled(TextEditCommand command) const = 0; |
| 175 | 179 |
| 176 // Execute |command| on the next key event. This allows a TextInputClient to | 180 // Execute |command| on the next key event. This allows a TextInputClient to |
| 177 // be informed of a platform-independent edit command that has been derived | 181 // be informed of a platform-independent edit command that has been derived |
| 178 // from the key event currently being dispatched (but not yet sent to the | 182 // from the key event currently being dispatched (but not yet sent to the |
| 179 // TextInputClient). The edit command will take into account any OS-specific, | 183 // TextInputClient). The edit command will take into account any OS-specific, |
| 180 // or user-specified, keybindings that may be set up. | 184 // or user-specified, keybindings that may be set up. |
| 181 virtual void SetTextEditCommandForNextKeyEvent(TextEditCommand command) = 0; | 185 virtual void SetTextEditCommandForNextKeyEvent(TextEditCommand command) = 0; |
| 182 }; | 186 }; |
| 183 | 187 |
| 184 } // namespace ui | 188 } // namespace ui |
| 185 | 189 |
| 186 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 190 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
| OLD | NEW |