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

Unified Diff: mojo/shell/network_service_loader.h

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix message loop destruction order 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/network_service_loader.h
diff --git a/mojo/shell/network_service_loader.h b/mojo/shell/network_service_loader.h
index 257f70b3ba128935eae367412cab514e7baf34dd..39f240c2aeea75e9fd97e6b3c0c0c977bae442e5 100644
--- a/mojo/shell/network_service_loader.h
+++ b/mojo/shell/network_service_loader.h
@@ -10,17 +10,21 @@
#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/bindings/interface_factory.h"
#include "mojo/service_manager/service_loader.h"
#include "mojo/services/network/network_context.h"
namespace mojo {
class ApplicationImpl;
+class ProfileService;
namespace shell {
// ServiceLoader responsible for creating connections to the NetworkService.
-class NetworkServiceLoader : public ServiceLoader, public ApplicationDelegate {
+class NetworkServiceLoader : public ServiceLoader,
+ public ApplicationDelegate,
+ public InterfaceFactory<NetworkService> {
public:
NetworkServiceLoader();
virtual ~NetworkServiceLoader();
@@ -39,6 +43,10 @@ class NetworkServiceLoader : public ServiceLoader, public ApplicationDelegate {
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
MOJO_OVERRIDE;
+ // InterfaceFactory<NetworkService> overrides.
+ virtual void Create(ApplicationConnection* connection,
+ InterfaceRequest<NetworkService> request) OVERRIDE;
+
base::ScopedPtrHashMap<uintptr_t, ApplicationImpl> apps_;
scoped_ptr<NetworkContext> context_;

Powered by Google App Engine
This is Rietveld 408576698