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 CHROME_BROWSER_UI_VIEWS_IME_DRIVER_SIMPLE_INPUT_METHOD_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_IME_DRIVER_SIMPLE_INPUT_METHOD_H_ |
| 7 |
| 8 #include "services/ui/public/interfaces/ime/ime.mojom.h" |
| 9 |
| 10 // This is to be used on platforms where a proper implementation of |
| 11 // ui::mojom::InputMethod is missing. It doesn't handle any events and calls |
| 12 // the callback with false, which will result in client code handling events |
| 13 // locally. |
| 14 class SimpleInputMethod : public ui::mojom::InputMethod { |
| 15 public: |
| 16 SimpleInputMethod(); |
| 17 ~SimpleInputMethod() override; |
| 18 |
| 19 // ui::mojom::InputMethod: |
| 20 void OnTextInputModeChanged( |
| 21 ui::mojom::TextInputMode text_input_mode) override; |
| 22 void OnTextInputTypeChanged( |
| 23 ui::mojom::TextInputType text_input_type) override; |
| 24 void OnCaretBoundsChanged(const gfx::Rect& caret_bounds) override; |
| 25 void ProcessKeyEvent(std::unique_ptr<ui::Event> key_event, |
| 26 const ProcessKeyEventCallback& callback) override; |
| 27 void CancelComposition() override; |
| 28 |
| 29 private: |
| 30 DISALLOW_COPY_AND_ASSIGN(SimpleInputMethod); |
| 31 }; |
| 32 |
| 33 #endif // CHROME_BROWSER_UI_VIEWS_IME_DRIVER_SIMPLE_INPUT_METHOD_H_ |
OLD | NEW |