OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "content/public/common/request_context_frame_type.h" | 24 #include "content/public/common/request_context_frame_type.h" |
25 #include "content/public/common/request_context_type.h" | 25 #include "content/public/common/request_context_type.h" |
26 #include "content/public/common/resource_type.h" | 26 #include "content/public/common/resource_type.h" |
27 | 27 |
28 namespace storage { | 28 namespace storage { |
29 class BlobStorageContext; | 29 class BlobStorageContext; |
30 } | 30 } |
31 | 31 |
32 namespace content { | 32 namespace content { |
33 | 33 |
| 34 class ResourceMessageFilter; |
34 class ResourceRequestBodyImpl; | 35 class ResourceRequestBodyImpl; |
35 class ServiceWorkerContextCore; | 36 class ServiceWorkerContextCore; |
36 class ServiceWorkerDispatcherHost; | 37 class ServiceWorkerDispatcherHost; |
37 class ServiceWorkerRequestHandler; | 38 class ServiceWorkerRequestHandler; |
38 class ServiceWorkerVersion; | 39 class ServiceWorkerVersion; |
39 | 40 |
40 // This class is the browser-process representation of a service worker | 41 // This class is the browser-process representation of a service worker |
41 // provider. There are two general types of providers: 1) those for a client | 42 // provider. There are two general types of providers: 1) those for a client |
42 // (windows, dedicated workers, or shared workers), and 2) those for hosting a | 43 // (windows, dedicated workers, or shared workers), and 2) those for hosting a |
43 // running service worker. | 44 // running service worker. |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 return dispatcher_host_; | 226 return dispatcher_host_; |
226 } | 227 } |
227 | 228 |
228 // PlzNavigate | 229 // PlzNavigate |
229 // Completes initialization of provider hosts used for navigation requests. | 230 // Completes initialization of provider hosts used for navigation requests. |
230 void CompleteNavigationInitialized( | 231 void CompleteNavigationInitialized( |
231 int process_id, | 232 int process_id, |
232 int frame_routing_id, | 233 int frame_routing_id, |
233 ServiceWorkerDispatcherHost* dispatcher_host); | 234 ServiceWorkerDispatcherHost* dispatcher_host); |
234 | 235 |
| 236 // PlzNavigate |
| 237 // Keeps the ResourceMessageFilter for navigation preload. |
| 238 void set_resource_filter_for_navigation_preload( |
| 239 scoped_refptr<ResourceMessageFilter> filter); |
| 240 ResourceMessageFilter* resource_filter_for_navigation_preload() { |
| 241 return resource_filter_for_navigation_preload_.get(); |
| 242 } |
| 243 |
235 // Sends event messages to the renderer. Events for the worker are queued up | 244 // Sends event messages to the renderer. Events for the worker are queued up |
236 // until the worker thread id is known via SetReadyToSendMessagesToWorker(). | 245 // until the worker thread id is known via SetReadyToSendMessagesToWorker(). |
237 void SendUpdateFoundMessage( | 246 void SendUpdateFoundMessage( |
238 int registration_handle_id); | 247 int registration_handle_id); |
239 void SendSetVersionAttributesMessage( | 248 void SendSetVersionAttributesMessage( |
240 int registration_handle_id, | 249 int registration_handle_id, |
241 ChangedVersionAttributesMask changed_mask, | 250 ChangedVersionAttributesMask changed_mask, |
242 ServiceWorkerVersion* installing_version, | 251 ServiceWorkerVersion* installing_version, |
243 ServiceWorkerVersion* waiting_version, | 252 ServiceWorkerVersion* waiting_version, |
244 ServiceWorkerVersion* active_version); | 253 ServiceWorkerVersion* active_version); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 | 376 |
368 std::unique_ptr<OneShotGetReadyCallback> get_ready_callback_; | 377 std::unique_ptr<OneShotGetReadyCallback> get_ready_callback_; |
369 scoped_refptr<ServiceWorkerVersion> controlling_version_; | 378 scoped_refptr<ServiceWorkerVersion> controlling_version_; |
370 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; | 379 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; |
371 base::WeakPtr<ServiceWorkerContextCore> context_; | 380 base::WeakPtr<ServiceWorkerContextCore> context_; |
372 ServiceWorkerDispatcherHost* dispatcher_host_; | 381 ServiceWorkerDispatcherHost* dispatcher_host_; |
373 bool allow_association_; | 382 bool allow_association_; |
374 | 383 |
375 std::vector<base::Closure> queued_events_; | 384 std::vector<base::Closure> queued_events_; |
376 | 385 |
| 386 scoped_refptr<ResourceMessageFilter> resource_filter_for_navigation_preload_; |
| 387 |
377 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 388 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
378 }; | 389 }; |
379 | 390 |
380 } // namespace content | 391 } // namespace content |
381 | 392 |
382 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 393 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |