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

Unified Diff: mojo/shell/view_manager_loader.cc

Issue 267293004: Wires up view manager to an actual display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 7 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 | « mojo/shell/view_manager_loader.h ('k') | ui/aura/window_tree_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/view_manager_loader.cc
diff --git a/mojo/shell/view_manager_loader.cc b/mojo/shell/view_manager_loader.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a3d0cbd4a10fe377e85729054b3c04b629fb069e
--- /dev/null
+++ b/mojo/shell/view_manager_loader.cc
@@ -0,0 +1,40 @@
+// 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.
+
+#include "mojo/shell/view_manager_loader.h"
+
+#include "mojo/public/cpp/shell/application.h"
+#include "mojo/services/view_manager/root_node_manager.h"
+#include "mojo/services/view_manager/view_manager_connection.h"
+
+namespace mojo {
+namespace shell {
+
+ViewManagerLoader::ViewManagerLoader() {
+}
+
+ViewManagerLoader::~ViewManagerLoader() {
+}
+
+void ViewManagerLoader::LoadService(ServiceManager* manager,
+ const GURL& url,
+ ScopedShellHandle shell_handle) {
+ scoped_ptr<Application> app(new Application(shell_handle.Pass()));
+ if (!root_node_manager_.get()) {
+ root_node_manager_.reset(
+ new services::view_manager::RootNodeManager(app->shell()));
+ }
+ app->AddServiceConnector(
+ new ServiceConnector<services::view_manager::ViewManagerConnection,
+ services::view_manager::RootNodeManager>(
+ root_node_manager_.get()));
+ apps_.push_back(app.release());
+}
+
+void ViewManagerLoader::OnServiceError(ServiceManager* manager,
+ const GURL& url) {
+}
+
+} // namespace shell
+} // namespace mojo
« no previous file with comments | « mojo/shell/view_manager_loader.h ('k') | ui/aura/window_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698