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

Unified Diff: mojo/examples/browser/browser.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/examples/aura_demo/aura_demo.cc ('k') | mojo/examples/embedded_app/embedded_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/browser/browser.cc
diff --git a/mojo/examples/browser/browser.cc b/mojo/examples/browser/browser.cc
index e90eb503b6716b8b13da80ad43458c42e6292509..40d1caa1529a58c5b030af4c6d260295daea0d1d 100644
--- a/mojo/examples/browser/browser.cc
+++ b/mojo/examples/browser/browser.cc
@@ -14,6 +14,7 @@
#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/cpp/view_manager/view_observer.h"
#include "mojo/services/public/interfaces/navigation/navigation.mojom.h"
@@ -152,7 +153,11 @@ class Browser : public ApplicationDelegate,
public views::TextfieldController,
public view_manager::NodeObserver {
public:
- Browser() : view_manager_(NULL), root_(NULL), widget_(NULL) {}
+ Browser()
+ : view_manager_(NULL),
+ view_manager_client_factory_(this),
+ root_(NULL),
+ widget_(NULL) {}
virtual ~Browser() {
if (root_)
@@ -169,7 +174,7 @@ class Browser : public ApplicationDelegate,
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
MOJO_OVERRIDE {
- view_manager::ViewManager::ConfigureIncomingConnection(connection, this);
+ connection->AddService(&view_manager_client_factory_);
return true;
}
@@ -250,6 +255,7 @@ class Browser : public ApplicationDelegate,
scoped_ptr<ViewsInit> views_init_;
view_manager::ViewManager* view_manager_;
+ view_manager::ViewManagerClientFactory view_manager_client_factory_;
view_manager::Node* root_;
views::Widget* widget_;
navigation::NavigatorHostPtr navigator_host_;
« no previous file with comments | « mojo/examples/aura_demo/aura_demo.cc ('k') | mojo/examples/embedded_app/embedded_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698