Include Mojo SDK/EDK via fully-qualified paths in Chromium code.
[chromium-blink-merge.git] / ui / keyboard / webui / vk_mojo_handler.h
blob750120da92a54dacbd0d0d5d5861e0b20ea22e3c
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 "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
10 #include "ui/base/ime/input_method_observer.h"
11 #include "ui/keyboard/webui/keyboard.mojom.h"
13 namespace keyboard {
15 class VKMojoHandler : public KeyboardUIHandlerMojo,
16 public ui::InputMethodObserver {
17 public:
18 explicit VKMojoHandler(mojo::InterfaceRequest<KeyboardUIHandlerMojo> request);
19 ~VKMojoHandler() override;
21 private:
22 ui::InputMethod* GetInputMethod();
24 // KeyboardUIHandlerMojo:
25 void SendKeyEvent(const mojo::String& event_type,
26 int32_t char_value,
27 int32_t key_code,
28 const mojo::String& key_name,
29 int32_t modifiers) override;
30 void HideKeyboard() override;
32 // ui::InputMethodObserver:
33 void OnTextInputTypeChanged(const ui::TextInputClient* client) override;
34 void OnFocus() override;
35 void OnBlur() override;
36 void OnCaretBoundsChanged(const ui::TextInputClient* client) override;
37 void OnTextInputStateChanged(const ui::TextInputClient* text_client) override;
38 void OnInputMethodDestroyed(const ui::InputMethod* input_method) override;
39 void OnShowImeIfNeeded() override;
41 mojo::Binding<KeyboardUIHandlerMojo> binding_;
43 DISALLOW_COPY_AND_ASSIGN(VKMojoHandler);
46 } // namespace keyboard
48 #endif // UI_KEYBOARD_WEBUI_VK_MOJO_HANDLER_H_