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

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 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/services/window_manager/window_manager_service_impl.cc ('k') | mojo/shell/network_service_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2184072f6152a2b783f80060645b243249a3e3cf 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/application/interface_factory.h"
#include "mojo/service_manager/service_loader.h"
#include "mojo/services/network/network_context.h"
namespace mojo {
class ApplicationImpl;
+class NetworkService;
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();
@@ -35,9 +39,13 @@ class NetworkServiceLoader : public ServiceLoader, public ApplicationDelegate {
const GURL& url) OVERRIDE;
// ApplicationDelegate overrides.
- virtual void Initialize(ApplicationImpl* app) MOJO_OVERRIDE;
+ virtual void Initialize(ApplicationImpl* app) OVERRIDE;
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
- MOJO_OVERRIDE;
+ OVERRIDE;
+
+ // InterfaceFactory<NetworkService> overrides.
+ virtual void Create(ApplicationConnection* connection,
+ InterfaceRequest<NetworkService> request) OVERRIDE;
base::ScopedPtrHashMap<uintptr_t, ApplicationImpl> apps_;
scoped_ptr<NetworkContext> context_;
« no previous file with comments | « mojo/services/window_manager/window_manager_service_impl.cc ('k') | mojo/shell/network_service_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698