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

Unified Diff: mojo/shell/profile_service_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/profile_service_loader.h
diff --git a/mojo/shell/profile_service_loader.h b/mojo/shell/profile_service_loader.h
index bbb5d821d516c4cddc8efe0b162572ccc0109eb1..5284edd1663c91866a5192d0a234a5cb9ebdc995 100644
--- a/mojo/shell/profile_service_loader.h
+++ b/mojo/shell/profile_service_loader.h
@@ -10,7 +10,9 @@
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/memory/scoped_ptr.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/profile/profile_service_impl.h"
namespace mojo {
@@ -19,7 +21,9 @@ class ApplicationImpl;
namespace shell {
// ServiceLoader responsible for creating connections to the ProfileService.
-class ProfileServiceLoader : public ServiceLoader, public ApplicationDelegate {
+class ProfileServiceLoader : public ServiceLoader,
+ public ApplicationDelegate,
+ public InterfaceProvider<ProfileService> {
public:
ProfileServiceLoader();
virtual ~ProfileServiceLoader();
@@ -34,11 +38,17 @@ class ProfileServiceLoader : public ServiceLoader, public ApplicationDelegate {
const GURL& url) OVERRIDE;
// ApplicationDelegate overrides.
- virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
- MOJO_OVERRIDE;
+ virtual bool ConfigureIncomingConnection(
+ ApplicationConnection* connection) OVERRIDE;
+
+ // InterfaceProvider<ProfileService> overrides.
+ virtual void BindToRequest(ApplicationConnection* connection,
+ InterfaceRequest<ProfileService> request) OVERRIDE;
base::ScopedPtrHashMap<uintptr_t, ApplicationImpl> apps_;
+ ProfileServiceImpl impl_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileServiceLoader);
};

Powered by Google App Engine
This is Rietveld 408576698