| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 // Set the list of items that appears in the language menu when this IME is | 224 // Set the list of items that appears in the language menu when this IME is |
| 225 // active. | 225 // active. |
| 226 virtual bool SetMenuItems(const std::vector<MenuItem>& items) = 0; | 226 virtual bool SetMenuItems(const std::vector<MenuItem>& items) = 0; |
| 227 | 227 |
| 228 // Update the state of the menu items. | 228 // Update the state of the menu items. |
| 229 virtual bool UpdateMenuItems(const std::vector<MenuItem>& items) = 0; | 229 virtual bool UpdateMenuItems(const std::vector<MenuItem>& items) = 0; |
| 230 | 230 |
| 231 // Returns true if this IME is active, false if not. | 231 // Returns true if this IME is active, false if not. |
| 232 virtual bool IsActive() const = 0; | 232 virtual bool IsActive() const = 0; |
| 233 | 233 |
| 234 // Inform the engine that a key event has been processed. | |
| 235 virtual void KeyEventDone(input_method::KeyEventHandle* key_data, | |
| 236 bool handled) = 0; | |
| 237 | |
| 238 // Deletes |number_of_chars| unicode characters as the basis of |offset| from | 234 // Deletes |number_of_chars| unicode characters as the basis of |offset| from |
| 239 // the surrounding text. The |offset| is relative position based on current | 235 // the surrounding text. The |offset| is relative position based on current |
| 240 // caret. | 236 // caret. |
| 241 // NOTE: Currently we are falling back to backspace forwarding workaround, | 237 // NOTE: Currently we are falling back to backspace forwarding workaround, |
| 242 // because delete_surrounding_text is not supported in Chrome. So this | 238 // because delete_surrounding_text is not supported in Chrome. So this |
| 243 // function is restricted for only preceding text. | 239 // function is restricted for only preceding text. |
| 244 // TODO(nona): Support full spec delete surrounding text. | 240 // TODO(nona): Support full spec delete surrounding text. |
| 245 virtual bool DeleteSurroundingText(int context_id, | 241 virtual bool DeleteSurroundingText(int context_id, |
| 246 int offset, | 242 int offset, |
| 247 size_t number_of_chars, | 243 size_t number_of_chars, |
| 248 std::string* error) = 0; | 244 std::string* error) = 0; |
| 249 | 245 |
| 250 // Hides the input view window (from API call). | 246 // Hides the input view window (from API call). |
| 251 virtual void HideInputView() = 0; | 247 virtual void HideInputView() = 0; |
| 252 }; | 248 }; |
| 253 | 249 |
| 254 } // namespace chromeos | 250 } // namespace chromeos |
| 255 | 251 |
| 256 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_ | 252 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_ |
| OLD | NEW |