summaryrefslogtreecommitdiffstats
path: root/mojo/shell
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-09 10:47:07 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-09 10:47:07 +0000
commit378308bf29cee99e7222ad30d4479dbf437d0810 (patch)
tree774fe3ad5d2c1e70dd4533f946ed90b9377100cd /mojo/shell
parentd5569147a3f489325f7b37509c4cfc1b9a3f7637 (diff)
downloadchromium_src-378308bf29cee99e7222ad30d4479dbf437d0810.zip
chromium_src-378308bf29cee99e7222ad30d4479dbf437d0810.tar.gz
chromium_src-378308bf29cee99e7222ad30d4479dbf437d0810.tar.bz2
Revert of Wires up view manager to an actual display (https://codereview.chromium.org/267293004/)
Reason for revert: Broke runhooks, http://build.chromium.org/p/chromium.win/builders/Win%20Builder/builds/20195/steps/runhooks/logs/stdio This is a trivial typo, but I have only limited cycles. Original issue's description: > Wires up view manager to an actual display > > Adds a SetViewContents to exercise this. > > BUG=365012 > TEST=none > R=ben@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269206 TBR=ben@chromium.org,sky@chromium.org NOTREECHECKS=true NOTRY=true BUG=365012 Review URL: https://codereview.chromium.org/275853002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269212 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/shell')
-rw-r--r--mojo/shell/context.cc32
-rw-r--r--mojo/shell/view_manager_loader.cc40
-rw-r--r--mojo/shell/view_manager_loader.h46
3 files changed, 31 insertions, 87 deletions
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc
index 9879a17..f5d405f 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 {
@@ -51,6 +52,35 @@ class Setup {
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
class Context::NativeViewportServiceLoader : public ServiceLoader {
diff --git a/mojo/shell/view_manager_loader.cc b/mojo/shell/view_manager_loader.cc
deleted file mode 100644
index a3d0cbd..0000000
--- a/mojo/shell/view_manager_loader.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// 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
diff --git a/mojo/shell/view_manager_loader.h b/mojo/shell/view_manager_loader.h
deleted file mode 100644
index 021f2a4..0000000
--- a/mojo/shell/view_manager_loader.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// 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 MOJO_SHELL_VIEW_MANAGER_LOADER_H_
-#define MOJO_SHELL_VIEW_MANAGER_LOADER_H_
-
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/scoped_vector.h"
-#include "mojo/service_manager/service_loader.h"
-
-namespace mojo {
-namespace services {
-namespace view_manager {
-class RootNodeManager;
-}
-}
-
-class Application;
-
-namespace shell {
-
-// ServiceLoader responsible for creating connections to the ViewManager.
-class ViewManagerLoader : public ServiceLoader {
- public:
- ViewManagerLoader();
- virtual ~ViewManagerLoader();
-
- private:
- // ServiceLoader overrides:
- virtual void LoadService(ServiceManager* manager,
- const GURL& url,
- ScopedShellHandle shell_handle) OVERRIDE;
- virtual void OnServiceError(ServiceManager* manager,
- const GURL& url) OVERRIDE;
-
- scoped_ptr<services::view_manager::RootNodeManager> root_node_manager_;
- ScopedVector<Application> apps_;
-
- DISALLOW_COPY_AND_ASSIGN(ViewManagerLoader);
-};
-
-} // namespace shell
-} // namespace mojo
-
-#endif // MOJO_SHELL_VIEW_MANAGER_LOADER_H_