Chromium Code Reviews| Index: chrome/browser/ui/views/ime_driver/noop_input_method.h |
| diff --git a/chrome/browser/ui/views/ime_driver/noop_input_method.h b/chrome/browser/ui/views/ime_driver/noop_input_method.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..47070e25c200b5f7a1745f27b8137025aab27dc8 |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/ime_driver/noop_input_method.h |
| @@ -0,0 +1,33 @@ |
| +// 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 CHROME_BROWSER_UI_VIEWS_IME_DRIVER_NOOP_INPUT_METHOD_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_IME_DRIVER_NOOP_INPUT_METHOD_H_ |
| + |
| +#include "services/ui/public/interfaces/ime/ime.mojom.h" |
| + |
| +// This is to be used on platforms where a proper implementation of |
| +// ui::mojom::InputMethod is missing. It doesn't handle any events and calls |
| +// the callback with false, which will result in client code handling events |
| +// locally. |
| +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.
|
| + public: |
| + NoOpInputMethod() {} |
| + ~NoOpInputMethod() override {} |
| + |
| + // ui::mojom::InputMethod: |
| + void OnTextInputModeChanged( |
| + 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.
|
| + void OnTextInputTypeChanged( |
| + ui::mojom::TextInputType text_input_type) override {} |
| + void OnCaretBoundsChanged(const gfx::Rect& caret_bounds) override {} |
| + void ProcessKeyEvent(std::unique_ptr<ui::Event> key_event, |
| + const ProcessKeyEventCallback& callback) override; |
| + void CancelComposition() override {} |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(NoOpInputMethod); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_IME_DRIVER_NOOP_INPUT_METHOD_H_ |