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

Unified Diff: mojo/examples/aura_demo/aura_demo.cc

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix network_service_loader Created 6 years, 5 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/dbus/dbus_external_service.h ('k') | mojo/examples/browser/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/aura_demo/aura_demo.cc
diff --git a/mojo/examples/aura_demo/aura_demo.cc b/mojo/examples/aura_demo/aura_demo.cc
index 263493f2ba12377bf57b066e1b245bf81826da9f..71dfd32a4a426230df25d4792afdcbc92d55861d 100644
--- a/mojo/examples/aura_demo/aura_demo.cc
+++ b/mojo/examples/aura_demo/aura_demo.cc
@@ -10,12 +10,14 @@
#include "mojo/aura/screen_mojo.h"
#include "mojo/aura/window_tree_host_mojo.h"
#include "mojo/aura/window_tree_host_mojo_delegate.h"
+#include "mojo/public/cpp/application/application_connection.h"
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/system/core.h"
#include "mojo/public/interfaces/service_provider/service_provider.mojom.h"
#include "mojo/services/public/cpp/view_manager/node.h"
#include "mojo/services/public/cpp/view_manager/view.h"
#include "mojo/services/public/cpp/view_manager/view_manager.h"
+#include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h"
#include "mojo/services/public/cpp/view_manager/view_manager_delegate.h"
#include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom.h"
#include "ui/aura/client/default_capture_client.h"
@@ -111,8 +113,8 @@ class AuraDemo : public ApplicationDelegate,
: window1_(NULL),
window2_(NULL),
window21_(NULL),
- view_(NULL) {
- }
+ view_(NULL),
+ view_manager_client_factory_(this) {}
virtual ~AuraDemo() {}
private:
@@ -172,7 +174,7 @@ class AuraDemo : public ApplicationDelegate,
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
MOJO_OVERRIDE {
- view_manager::ViewManager::ConfigureIncomingConnection(connection, this);
+ connection->AddService(&view_manager_client_factory_);
return true;
}
@@ -192,6 +194,8 @@ class AuraDemo : public ApplicationDelegate,
view_manager::View* view_;
+ view_manager::ViewManagerClientFactory view_manager_client_factory_;
+
scoped_ptr<aura::WindowTreeHost> window_tree_host_;
DISALLOW_COPY_AND_ASSIGN(AuraDemo);
« no previous file with comments | « mojo/dbus/dbus_external_service.h ('k') | mojo/examples/browser/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698