Index: ui/aura/test/input_method_glue.h |
diff --git a/ui/aura/test/input_method_glue.h b/ui/aura/test/input_method_glue.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..23f30d339ec1dff5c93898a935768f79c02310eb |
--- /dev/null |
+++ b/ui/aura/test/input_method_glue.h |
@@ -0,0 +1,36 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_AURA_TEST_INPUT_METHOD_GLUE_H_ |
+#define UI_AURA_TEST_INPUT_METHOD_GLUE_H_ |
+ |
+#include "ui/base/ime/input_method_delegate.h" |
+#include "ui/events/event_handler.h" |
+ |
+namespace aura { |
+ |
+class WindowTreeHost; |
+ |
+class InputMethodGlue : public ui::EventHandler, |
+ public ui::internal::InputMethodDelegate { |
+ public: |
+ explicit InputMethodGlue(aura::WindowTreeHost* host); |
+ ~InputMethodGlue() override; |
+ |
+ private: |
+ // ui::EventHandler: |
+ void OnKeyEvent(ui::KeyEvent* key) override; |
+ |
+ // ui::internal::InputMethodDelegate: |
+ 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
|
+ |
+ aura::WindowTreeHost* host_; |
+ bool processing_ime_event_ = false; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(InputMethodGlue); |
+}; |
+ |
+} // namespace aura |
+ |
+#endif // UI_AURA_TEST_INPUT_METHOD_GLUE_H_ |