1 // Copyright 2014 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.
5 #ifndef UI_KEYBOARD_WEBUI_VK_MOJO_HANDLER_H_
6 #define UI_KEYBOARD_WEBUI_VK_MOJO_HANDLER_H_
8 #include "base/macros.h"
9 #include "ui/base/ime/input_method_observer.h"
10 #include "ui/keyboard/webui/keyboard.mojom.h"
14 class VKMojoHandler : public mojo::InterfaceImpl<KeyboardUIHandlerMojo>,
15 public ui::InputMethodObserver {
18 ~VKMojoHandler() override;
21 ui::InputMethod* GetInputMethod();
23 // mojo::InterfaceImpl<>:
24 void OnConnectionEstablished() override;
26 // KeyboardUIHandlerMojo:
27 void SendKeyEvent(const mojo::String& event_type,
30 const mojo::String& key_name,
31 int32_t modifiers) override;
32 void HideKeyboard() override;
34 // ui::InputMethodObserver:
35 void OnTextInputTypeChanged(const ui::TextInputClient* client) override;
36 void OnFocus() override;
37 void OnBlur() override;
38 void OnCaretBoundsChanged(const ui::TextInputClient* client) override;
39 void OnTextInputStateChanged(const ui::TextInputClient* text_client) override;
40 void OnInputMethodDestroyed(const ui::InputMethod* input_method) override;
41 void OnShowImeIfNeeded() override;
43 DISALLOW_COPY_AND_ASSIGN(VKMojoHandler);
46 } // namespace keyboard
48 #endif // UI_KEYBOARD_WEBUI_VK_MOJO_HANDLER_H_