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