OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_SHELL_NETWORK_SERVICE_LOADER_H_ | 5 #ifndef MOJO_SHELL_NETWORK_SERVICE_LOADER_H_ |
6 #define MOJO_SHELL_NETWORK_SERVICE_LOADER_H_ | 6 #define MOJO_SHELL_NETWORK_SERVICE_LOADER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/containers/scoped_ptr_hash_map.h" | 10 #include "base/containers/scoped_ptr_hash_map.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // ServiceLoader responsible for creating connections to the NetworkService. | 24 // ServiceLoader responsible for creating connections to the NetworkService. |
25 class NetworkServiceLoader : public ServiceLoader, | 25 class NetworkServiceLoader : public ServiceLoader, |
26 public ApplicationDelegate, | 26 public ApplicationDelegate, |
27 public InterfaceFactory<NetworkService> { | 27 public InterfaceFactory<NetworkService> { |
28 public: | 28 public: |
29 NetworkServiceLoader(); | 29 NetworkServiceLoader(); |
30 virtual ~NetworkServiceLoader(); | 30 virtual ~NetworkServiceLoader(); |
31 | 31 |
32 private: | 32 private: |
33 // ServiceLoader overrides: | 33 // ServiceLoader overrides: |
34 virtual void LoadService( | 34 virtual void Load(ServiceManager* manager, |
35 ServiceManager* manager, | 35 const GURL& url, |
36 const GURL& url, | 36 scoped_refptr<LoadCallbacks> callbacks) OVERRIDE; |
37 ScopedMessagePipeHandle shell_handle) OVERRIDE; | |
38 virtual void OnServiceError(ServiceManager* manager, | 37 virtual void OnServiceError(ServiceManager* manager, |
39 const GURL& url) OVERRIDE; | 38 const GURL& url) OVERRIDE; |
40 | 39 |
41 // ApplicationDelegate overrides. | 40 // ApplicationDelegate overrides. |
42 virtual void Initialize(ApplicationImpl* app) OVERRIDE; | 41 virtual void Initialize(ApplicationImpl* app) OVERRIDE; |
43 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) | 42 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) |
44 OVERRIDE; | 43 OVERRIDE; |
45 | 44 |
46 // InterfaceFactory<NetworkService> overrides. | 45 // InterfaceFactory<NetworkService> overrides. |
47 virtual void Create(ApplicationConnection* connection, | 46 virtual void Create(ApplicationConnection* connection, |
48 InterfaceRequest<NetworkService> request) OVERRIDE; | 47 InterfaceRequest<NetworkService> request) OVERRIDE; |
49 | 48 |
50 base::ScopedPtrHashMap<uintptr_t, ApplicationImpl> apps_; | 49 base::ScopedPtrHashMap<uintptr_t, ApplicationImpl> apps_; |
51 scoped_ptr<NetworkContext> context_; | 50 scoped_ptr<NetworkContext> context_; |
52 | 51 |
53 DISALLOW_COPY_AND_ASSIGN(NetworkServiceLoader); | 52 DISALLOW_COPY_AND_ASSIGN(NetworkServiceLoader); |
54 }; | 53 }; |
55 | 54 |
56 } // namespace shell | 55 } // namespace shell |
57 } // namespace mojo | 56 } // namespace mojo |
58 | 57 |
59 #endif // MOJO_SHELL_NETWORK_SERVICE_LOADER_H_ | 58 #endif // MOJO_SHELL_NETWORK_SERVICE_LOADER_H_ |
OLD | NEW |