OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_AURA_TEST_INPUT_METHOD_GLUE_H_ | |
6 #define UI_AURA_TEST_INPUT_METHOD_GLUE_H_ | |
7 | |
8 #include "ui/base/ime/input_method_delegate.h" | |
9 #include "ui/events/event_handler.h" | |
10 | |
11 namespace aura { | |
12 | |
13 class WindowTreeHost; | |
14 | |
15 class InputMethodGlue : public ui::EventHandler, | |
16 public ui::internal::InputMethodDelegate { | |
17 public: | |
18 explicit InputMethodGlue(aura::WindowTreeHost* host); | |
19 ~InputMethodGlue() override; | |
20 | |
21 private: | |
22 // ui::EventHandler: | |
23 void OnKeyEvent(ui::KeyEvent* key) override; | |
24 | |
25 // ui::internal::InputMethodDelegate: | |
26 ui::EventDispatchDetails DispatchKeyEventPostIME(ui::KeyEvent* key) override; | |
Shu Chen
2016/07/21 00:28:53
Why does InputMethodGlue need to inherit from Inpu
sadrul
2016/07/21 00:51:32
The override dispatches the event back to the Wind
| |
27 | |
28 aura::WindowTreeHost* host_; | |
29 bool processing_ime_event_ = false; | |
30 | |
31 DISALLOW_COPY_AND_ASSIGN(InputMethodGlue); | |
32 }; | |
33 | |
34 } // namespace aura | |
35 | |
36 #endif // UI_AURA_TEST_INPUT_METHOD_GLUE_H_ | |
OLD | NEW |