Chromium Code Reviews| 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_NOOP_INPUT_METHOD_H_ | |
| 6 #define CHROME_BROWSER_UI_VIEWS_IME_DRIVER_NOOP_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 NoOpInputMethod : public ui::mojom::InputMethod { | |
|
sky
2016/12/12 02:16:21
NoOp makes me thing this does nothing, when it run
Hadi
2016/12/12 16:04:58
Done.
| |
| 15 public: | |
| 16 NoOpInputMethod() {} | |
| 17 ~NoOpInputMethod() override {} | |
| 18 | |
| 19 // ui::mojom::InputMethod: | |
| 20 void OnTextInputModeChanged( | |
| 21 ui::mojom::TextInputMode text_input_mode) override {} | |
|
sky
2016/12/12 02:16:21
Don't inline these (see style guide).
Hadi
2016/12/12 16:04:58
Done.
| |
| 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(NoOpInputMethod); | |
| 31 }; | |
| 32 | |
| 33 #endif // CHROME_BROWSER_UI_VIEWS_IME_DRIVER_NOOP_INPUT_METHOD_H_ | |
| OLD | NEW |