Index: mojo/shell/context.cc |
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc |
index 9879a17732a72ae526305e095b48b181bfbf57d7..f5d405f5f1e312b23f222b3ae35682420d24daf5 100644 |
--- a/mojo/shell/context.cc |
+++ b/mojo/shell/context.cc |
@@ -27,7 +27,8 @@ |
#endif // defined(OS_LINUX) |
#if defined(USE_AURA) |
-#include "mojo/shell/view_manager_loader.h" |
+#include "mojo/services/view_manager/root_node_manager.h" |
+#include "mojo/services/view_manager/view_manager_connection.h" |
#endif |
namespace mojo { |
@@ -50,6 +51,35 @@ |
}; |
static base::LazyInstance<Setup> setup = LAZY_INSTANCE_INITIALIZER; |
+ |
+#if defined(USE_AURA) |
+class ViewManagerLoader : public ServiceLoader { |
+ public: |
+ ViewManagerLoader() {} |
+ virtual ~ViewManagerLoader() {} |
+ |
+ private: |
+ virtual void LoadService(ServiceManager* manager, |
+ const GURL& url, |
+ ScopedShellHandle shell_handle) OVERRIDE { |
+ scoped_ptr<Application> app(new Application(shell_handle.Pass())); |
+ app->AddServiceConnector( |
+ new ServiceConnector<services::view_manager::ViewManagerConnection, |
+ services::view_manager::RootNodeManager>( |
+ &root_node_manager_)); |
+ apps_.push_back(app.release()); |
+ } |
+ |
+ virtual void OnServiceError(ServiceManager* manager, |
+ const GURL& url) OVERRIDE { |
+ } |
+ |
+ services::view_manager::RootNodeManager root_node_manager_; |
+ ScopedVector<Application> apps_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ViewManagerLoader); |
+}; |
+#endif |
} // namespace |