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 CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ | 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ |
6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ | 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // This is for controllers. | 65 // This is for controllers. |
66 explicit ServiceWorkerNetworkProvider( | 66 explicit ServiceWorkerNetworkProvider( |
67 mojom::ServiceWorkerProviderInfoForStartWorkerPtr info); | 67 mojom::ServiceWorkerProviderInfoForStartWorkerPtr info); |
68 | 68 |
69 ServiceWorkerNetworkProvider(); | 69 ServiceWorkerNetworkProvider(); |
70 ~ServiceWorkerNetworkProvider(); | 70 ~ServiceWorkerNetworkProvider(); |
71 | 71 |
72 int provider_id() const { return provider_id_; } | 72 int provider_id() const { return provider_id_; } |
73 ServiceWorkerProviderContext* context() const { return context_.get(); } | 73 ServiceWorkerProviderContext* context() const { return context_.get(); } |
74 | 74 |
| 75 mojom::URLLoaderFactory* script_loader_factory() { |
| 76 return script_loader_factory_.get(); |
| 77 } |
| 78 |
75 bool IsControlledByServiceWorker() const; | 79 bool IsControlledByServiceWorker() const; |
76 | 80 |
77 private: | 81 private: |
78 const int provider_id_; | 82 const int provider_id_; |
79 scoped_refptr<ServiceWorkerProviderContext> context_; | 83 scoped_refptr<ServiceWorkerProviderContext> context_; |
80 mojom::ServiceWorkerDispatcherHostAssociatedPtr dispatcher_host_; | 84 mojom::ServiceWorkerDispatcherHostAssociatedPtr dispatcher_host_; |
81 mojom::ServiceWorkerProviderHostAssociatedPtr provider_host_; | 85 mojom::ServiceWorkerProviderHostAssociatedPtr provider_host_; |
| 86 mojom::URLLoaderFactoryAssociatedPtr script_loader_factory_; |
| 87 |
82 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerNetworkProvider); | 88 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerNetworkProvider); |
83 }; | 89 }; |
84 | 90 |
85 } // namespace content | 91 } // namespace content |
86 | 92 |
87 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ | 93 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ |
OLD | NEW |