OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_IME_INPUT_CONTEXT_HANDLER_INTERFACE_H_ | 5 #ifndef UI_BASE_IME_IME_INPUT_CONTEXT_HANDLER_INTERFACE_H_ |
6 #define UI_BASE_IME_IME_INPUT_CONTEXT_HANDLER_INTERFACE_H_ | 6 #define UI_BASE_IME_IME_INPUT_CONTEXT_HANDLER_INTERFACE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include "ui/base/ime/composition_text.h" | 11 #include "ui/base/ime/composition_text.h" |
12 #include "ui/base/ime/ui_base_ime_export.h" | 12 #include "ui/base/ime/ui_base_ime_export.h" |
| 13 #include "ui/events/event.h" |
13 | 14 |
14 namespace ui { | 15 namespace ui { |
15 | 16 |
16 class UI_BASE_IME_EXPORT IMEInputContextHandlerInterface { | 17 class UI_BASE_IME_EXPORT IMEInputContextHandlerInterface { |
17 public: | 18 public: |
18 // Called when the engine commit a text. | 19 // Called when the engine commit a text. |
19 virtual void CommitText(const std::string& text) = 0; | 20 virtual void CommitText(const std::string& text) = 0; |
20 | 21 |
21 // Called when the engine updates composition text. | 22 // Called when the engine updates composition text. |
22 virtual void UpdateCompositionText(const CompositionText& text, | 23 virtual void UpdateCompositionText(const CompositionText& text, |
23 uint32_t cursor_pos, | 24 uint32_t cursor_pos, |
24 bool visible) = 0; | 25 bool visible) = 0; |
25 | 26 |
26 // Called when the engine request deleting surrounding string. | 27 // Called when the engine request deleting surrounding string. |
27 virtual void DeleteSurroundingText(int32_t offset, uint32_t length) = 0; | 28 virtual void DeleteSurroundingText(int32_t offset, uint32_t length) = 0; |
| 29 |
| 30 // Called when the engine sends a key event. |
| 31 virtual void SendKeyEvent(KeyEvent* event) = 0; |
28 }; | 32 }; |
29 | 33 |
30 } // namespace ui | 34 } // namespace ui |
31 | 35 |
32 #endif // UI_BASE_IME_IME_INPUT_CONTEXT_HANDLER_INTERFACE_H_ | 36 #endif // UI_BASE_IME_IME_INPUT_CONTEXT_HANDLER_INTERFACE_H_ |
OLD | NEW |