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

Unified Diff: mojo/shell/view_manager_loader.h

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some InterfaceProvider impls for common cases 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
Index: mojo/shell/view_manager_loader.h
diff --git a/mojo/shell/view_manager_loader.h b/mojo/shell/view_manager_loader.h
index 85454e239152afe8de5528a556e2c3e83662f23b..640d5efe5c8cceb7c7e839f071b45f0fc27919e6 100644
--- a/mojo/shell/view_manager_loader.h
+++ b/mojo/shell/view_manager_loader.h
@@ -8,7 +8,9 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "mojo/public/cpp/application/application_delegate.h"
+#include "mojo/public/cpp/application/interface_provider.h"
#include "mojo/service_manager/service_loader.h"
+#include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
namespace mojo {
@@ -17,7 +19,10 @@ class Application;
namespace shell {
// ServiceLoader responsible for creating connections to the ViewManager.
-class ViewManagerLoader : public ServiceLoader, public ApplicationDelegate {
+class ViewManagerLoader
+ : public ServiceLoader,
+ public ApplicationDelegate,
+ public InterfaceProvider<view_manager::ViewManagerInitService> {
public:
ViewManagerLoader();
virtual ~ViewManagerLoader();
@@ -33,7 +38,12 @@ class ViewManagerLoader : public ServiceLoader, public ApplicationDelegate {
// ApplicationDelegate overrides.
virtual bool ConfigureIncomingConnection(
- mojo::ApplicationConnection* connection) MOJO_OVERRIDE;
+ mojo::ApplicationConnection* connection) OVERRIDE;
+
+ // InterfaceProvider<view_manager::ViewManagerInitService> overrides.
+ virtual void BindToRequest(
+ ApplicationConnection* connection,
+ InterfaceRequest<view_manager::ViewManagerInitService> request) OVERRIDE;
ScopedVector<Application> apps_;

Powered by Google App Engine
This is Rietveld 408576698