Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Side by Side Diff: chrome/browser/ui/views/ime_driver/input_method_bridge_chromeos.h

Issue 2557493002: IME for Mus: Use ui::InputMethodChromeOS to provide logic for ime driver. (Closed)
Patch Set: More cleanup. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_INPUT_METHOD_BRIDGE_CHROMEOS_H_
6 #define CHROME_BROWSER_UI_VIEWS_IME_DRIVER_INPUT_METHOD_BRIDGE_CHROMEOS_H_
7
8 #include "services/ui/public/interfaces/ime/ime.mojom.h"
9 #include "ui/base/ime/input_method_chromeos.h"
10
11 // This bridges between mojo InputMethod API and ui::InputMethodChromeOS. It
12 // forwards the received events to an instance of ui::InputMethodChromeOS.
13 class InputMethodBridge : public ui::mojom::InputMethod {
14 public:
15 explicit InputMethodBridge(ui::mojom::TextInputClientPtr client);
16 ~InputMethodBridge() override;
17
18 // ui::mojom::InputMethod:
19 void OnTextInputModeChanged(
20 ui::mojom::TextInputMode text_input_mode) override;
21 void OnTextInputTypeChanged(
22 ui::mojom::TextInputType text_input_type) override;
23 void OnCaretBoundsChanged(const gfx::Rect& caret_bounds) override;
24 void ProcessKeyEvent(std::unique_ptr<ui::Event> key_event,
25 const ProcessKeyEventCallback& callback) override;
26 void CancelComposition() override;
27
28 private:
29 std::unique_ptr<ui::TextInputClient> client_;
30 std::unique_ptr<ui::InputMethodChromeOS> input_method_chromeos_;
31
32 DISALLOW_COPY_AND_ASSIGN(InputMethodBridge);
33 };
34
35 #endif // CHROME_BROWSER_UI_VIEWS_IME_DRIVER_INPUT_METHOD_BRIDGE_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698