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

Unified Diff: ui/keyboard/webui/vk_webui_controller.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/vk_mojo_handler.cc ('k') | ui/keyboard/webui/vk_webui_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/webui/vk_webui_controller.h
diff --git a/athena/virtual_keyboard/vk_webui_controller.h b/ui/keyboard/webui/vk_webui_controller.h
similarity index 61%
rename from athena/virtual_keyboard/vk_webui_controller.h
rename to ui/keyboard/webui/vk_webui_controller.h
index c2c6ecc3a2b8d7bcd257e7f8951ee098101bc666..d701c6395e90d086ea0ab72d550e0416c9d2783a 100644
--- a/athena/virtual_keyboard/vk_webui_controller.h
+++ b/ui/keyboard/webui/vk_webui_controller.h
@@ -2,15 +2,26 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ATHENA_VIRTUAL_KEYBOARD_VK_WEBUI_CONTROLLER_H_
-#define ATHENA_VIRTUAL_KEYBOARD_VK_WEBUI_CONTROLLER_H_
+#ifndef UI_KEYBOARD_WEBUI_VK_WEBUI_CONTROLLER_H_
+#define UI_KEYBOARD_WEBUI_VK_WEBUI_CONTROLLER_H_
#include "base/macros.h"
#include "base/memory/singleton.h"
+#include "base/memory/weak_ptr.h"
#include "content/public/browser/web_ui_controller.h"
#include "content/public/browser/web_ui_controller_factory.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
+#include "mojo/public/cpp/system/core.h"
+#include "ui/keyboard/keyboard_export.h"
+#include "ui/keyboard/webui/keyboard.mojom.h"
-namespace athena {
+namespace content {
+class WebUIDataSource;
+}
+
+namespace keyboard {
+
+class VKMojoHandler;
class VKWebUIController : public content::WebUIController {
public:
@@ -18,10 +29,20 @@ class VKWebUIController : public content::WebUIController {
virtual ~VKWebUIController();
private:
+ void CreateAndStoreUIHandler(
+ mojo::InterfaceRequest<KeyboardUIHandlerMojo> request);
+
+ // content::WebUIController:
+ virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE;
+
+ scoped_ptr<VKMojoHandler> ui_handler_;
+ base::WeakPtrFactory<VKWebUIController> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(VKWebUIController);
};
-class VKWebUIControllerFactory : public content::WebUIControllerFactory {
+class KEYBOARD_EXPORT VKWebUIControllerFactory
+ : public content::WebUIControllerFactory {
public:
// WebUIControllerFactory:
virtual content::WebUI::TypeID GetWebUIType(
@@ -47,6 +68,6 @@ class VKWebUIControllerFactory : public content::WebUIControllerFactory {
DISALLOW_COPY_AND_ASSIGN(VKWebUIControllerFactory);
};
-} // namespace athena
+} // namespace keyboard
-#endif // ATHENA_VIRTUAL_KEYBOARD_VK_WEBUI_CONTROLLER_H_
+#endif // UI_KEYBOARD_WEBUI_VK_WEBUI_CONTROLLER_H_
« no previous file with comments | « ui/keyboard/webui/vk_mojo_handler.cc ('k') | ui/keyboard/webui/vk_webui_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698