Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_INPUT_METHOD_DELEGATE_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_DELEGATE_H_ |
| 6 #define UI_BASE_IME_INPUT_METHOD_DELEGATE_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ui/base/ime/ui_base_ime_export.h" | 8 #include "ui/base/ime/ui_base_ime_export.h" |
| 9 #include "ui/events/event_dispatcher.h" | 9 #include "ui/events/event_dispatcher.h" |
| 10 | 10 |
| 11 namespace ui { | 11 namespace ui { |
| 12 | 12 |
| 13 class KeyEvent; | 13 class KeyEvent; |
| 14 | 14 |
| 15 namespace internal { | 15 namespace internal { |
| 16 | 16 |
| 17 // An interface implemented by the object that handles events sent back from an | 17 // An interface implemented by the object that handles events sent back from an |
| 18 // ui::InputMethod implementation. | 18 // ui::InputMethod implementation. |
| 19 class UI_BASE_IME_EXPORT InputMethodDelegate { | 19 class UI_BASE_IME_EXPORT InputMethodDelegate { |
| 20 public: | 20 public: |
| 21 virtual ~InputMethodDelegate() {} | 21 virtual ~InputMethodDelegate() {} |
| 22 | 22 |
| 23 // Dispatch a key event already processed by the input method. | 23 // Dispatch a key event already processed by the input method. |
| 24 // Returns true if the event was processed. | 24 // Returns true if the event was processed. |
| 25 virtual ui::EventDispatchDetails DispatchKeyEventPostIME( | 25 virtual ui::EventDispatchDetails DispatchKeyEventPostIME( |
| 26 ui::KeyEvent* key_event) = 0; | 26 ui::KeyEvent* key_event) = 0; |
| 27 | |
| 28 virtual ui::EventDispatchDetails DispatchKeyEventPostIME( | |
|
Shu Chen
2017/07/06 03:38:42
Anything makes you decide not to keep InputMethodD
| |
| 29 ui::KeyEvent* key_event, | |
| 30 std::unique_ptr<base::Callback<void(bool)>> ack_callback); | |
| 27 }; | 31 }; |
| 28 | 32 |
| 29 } // namespace internal | 33 } // namespace internal |
| 30 } // namespace ui | 34 } // namespace ui |
| 31 | 35 |
| 32 #endif // UI_BASE_IME_INPUT_METHOD_DELEGATE_H_ | 36 #endif // UI_BASE_IME_INPUT_METHOD_DELEGATE_H_ |
| OLD | NEW |