OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 ASH_IME_INPUT_METHOD_EVENT_HANDLER_H_ |
| 6 #define ASH_IME_INPUT_METHOD_EVENT_HANDLER_H_ |
| 7 |
| 8 #include "ash/ash_export.h" |
| 9 #include "ui/events/event_handler.h" |
| 10 |
| 11 namespace ui { |
| 12 class InputMethod; |
| 13 class KeyEvent; |
| 14 } |
| 15 |
| 16 namespace ash { |
| 17 |
| 18 // An EventHandler |
| 19 class ASH_EXPORT InputMethodEventHandler : public ui::EventHandler { |
| 20 public: |
| 21 explicit InputMethodEventHandler(ui::InputMethod* input_method); |
| 22 ~InputMethodEventHandler() override; |
| 23 |
| 24 // True to skip sending event to the InputMethod. This is used |
| 25 // to process event passed from |DispatchKeyEventPostIME|. |
| 26 void SetPostIME(bool post_ime); |
| 27 |
| 28 private: |
| 29 // Overridden from ui::EventHandler: |
| 30 void OnKeyEvent(ui::KeyEvent* event) override; |
| 31 |
| 32 ui::InputMethod* input_method_; |
| 33 |
| 34 bool post_ime_; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(InputMethodEventHandler); |
| 37 }; |
| 38 |
| 39 } // namespace ash |
| 40 |
| 41 #endif // ASH_INPUT_METHOD_EVENT_HANDLER_H_ |
OLD | NEW |