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

Unified Diff: mojo/shell/view_manager_loader.cc

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: specify ownership in the Bind call 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
« mojo/services/surfaces/surfaces_impl.h ('K') | « mojo/shell/view_manager_loader.h ('k') | no next file » | 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
index e41a87469d84614b97105d4eab0f157f4d3a7260..6e797a662fa479fb27cd302191ba10dd33f64817 100644
--- a/mojo/shell/view_manager_loader.cc
+++ b/mojo/shell/view_manager_loader.cc
@@ -9,6 +9,10 @@
#include "mojo/services/view_manager/view_manager_init_service_impl.h"
namespace mojo {
+
+using view_manager::ViewManagerInitService;
+using view_manager::service::ViewManagerInitServiceImpl;
+
namespace shell {
ViewManagerLoader::ViewManagerLoader() {
@@ -34,9 +38,15 @@ void ViewManagerLoader::OnServiceError(ServiceManager* manager,
bool ViewManagerLoader::ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) {
- connection->AddService<view_manager::service::ViewManagerInitServiceImpl>();
+ connection->AddServiceProvider(this);
return true;
}
+void ViewManagerLoader::BindToRequest(
+ ApplicationConnection* connection,
+ InterfaceRequest<ViewManagerInitService> request) {
+ mojo::BindToRequest(new ViewManagerInitServiceImpl(connection), &request);
+}
+
} // namespace shell
} // namespace mojo
« mojo/services/surfaces/surfaces_impl.h ('K') | « mojo/shell/view_manager_loader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698