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

Unified Diff: ui/keyboard/webui/vk_mojo_handler.h

Issue 328303008: athena: Use mojo to provide the bindings for the virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 6 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/keyboard/webui/keyboard.mojom ('k') | ui/keyboard/webui/vk_mojo_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/webui/vk_mojo_handler.h
diff --git a/ui/keyboard/webui/vk_mojo_handler.h b/ui/keyboard/webui/vk_mojo_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..7ee3c9d05cbbf6d986d76cfbb7cff6a0692d4b99
--- /dev/null
+++ b/ui/keyboard/webui/vk_mojo_handler.h
@@ -0,0 +1,51 @@
+// Copyright 2014 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 UI_KEYBOARD_WEBUI_VK_MOJO_HANDLER_H_
+#define UI_KEYBOARD_WEBUI_VK_MOJO_HANDLER_H_
+
+#include "base/macros.h"
+#include "ui/base/ime/input_method_observer.h"
+#include "ui/keyboard/webui/keyboard.mojom.h"
+
+namespace keyboard {
+
+class VKMojoHandler : public mojo::InterfaceImpl<KeyboardUIHandlerMojo>,
+ public ui::InputMethodObserver {
+ public:
+ VKMojoHandler();
+ virtual ~VKMojoHandler();
+
+ private:
+ ui::InputMethod* GetInputMethod();
+
+ // mojo::InterfaceImpl<>:
+ virtual void OnConnectionEstablished() OVERRIDE;
+
+ // KeyboardUIHandlerMojo:
+ virtual void SendKeyEvent(const mojo::String& event_type,
+ int32_t char_value,
+ int32_t key_code,
+ const mojo::String& key_name,
+ int32_t modifiers) OVERRIDE;
+ virtual void HideKeyboard() OVERRIDE;
+
+ // ui::InputMethodObserver:
+ virtual void OnTextInputTypeChanged(
+ const ui::TextInputClient* client) OVERRIDE;
+ virtual void OnFocus() OVERRIDE;
+ virtual void OnBlur() OVERRIDE;
+ virtual void OnCaretBoundsChanged(const ui::TextInputClient* client) OVERRIDE;
+ virtual void OnTextInputStateChanged(
+ const ui::TextInputClient* text_client) OVERRIDE;
+ virtual void OnInputMethodDestroyed(
+ const ui::InputMethod* input_method) OVERRIDE;
+ virtual void OnShowImeIfNeeded() OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(VKMojoHandler);
+};
+
+} // namespace keyboard
+
+#endif // UI_KEYBOARD_WEBUI_VK_MOJO_HANDLER_H_
« no previous file with comments | « ui/keyboard/webui/keyboard.mojom ('k') | ui/keyboard/webui/vk_mojo_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698