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