| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 160 |
| 161 // Ensure the caret is within |rect|. |rect| is in screen coordinates and | 161 // Ensure the caret is within |rect|. |rect| is in screen coordinates and |
| 162 // may extend beyond the bounds of this TextInputClient. | 162 // may extend beyond the bounds of this TextInputClient. |
| 163 // Note: On Windows, the returned value is supposed to be DIP (Density | 163 // Note: On Windows, the returned value is supposed to be DIP (Density |
| 164 // Independent Pixel). | 164 // Independent Pixel). |
| 165 // TODO(ime): Have a clear spec whether the returned value is DIP or not. | 165 // TODO(ime): Have a clear spec whether the returned value is DIP or not. |
| 166 // http://crbug.com/360334 | 166 // http://crbug.com/360334 |
| 167 virtual void EnsureCaretInRect(const gfx::Rect& rect) = 0; | 167 virtual void EnsureCaretInRect(const gfx::Rect& rect) = 0; |
| 168 | 168 |
| 169 // Returns true if |command_id| is currently allowed to be executed. | 169 // Returns true if |command_id| is currently allowed to be executed. |
| 170 virtual bool IsEditCommandEnabled(int command_id) = 0; | 170 virtual bool IsEditCommandEnabled(int command_id) const = 0; |
| 171 | 171 |
| 172 // Execute the command specified by |command_id| on the next key event. | 172 // Execute the command specified by |command_id| on the next key event. |
| 173 // This allows a TextInputClient to be informed of a platform-independent edit | 173 // This allows a TextInputClient to be informed of a platform-independent edit |
| 174 // command that has been derived from the key event currently being dispatched | 174 // command that has been derived from the key event currently being dispatched |
| 175 // (but not yet sent to the TextInputClient). The edit command will take into | 175 // (but not yet sent to the TextInputClient). The edit command will take into |
| 176 // account any OS-specific, or user-specified, keybindings that may be set up. | 176 // account any OS-specific, or user-specified, keybindings that may be set up. |
| 177 virtual void SetEditCommandForNextKeyEvent(int command_id) = 0; | 177 virtual void SetEditCommandForNextKeyEvent(int command_id) = 0; |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 } // namespace ui | 180 } // namespace ui |
| 181 | 181 |
| 182 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 182 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
| OLD | NEW |