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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 base::Callback<void(ServiceWorkerRegistration* reigstration)>; | 57 base::Callback<void(ServiceWorkerRegistration* reigstration)>; |
58 | 58 |
59 // PlzNavigate | 59 // PlzNavigate |
60 // Used to pre-create a ServiceWorkerProviderHost for a navigation. The | 60 // Used to pre-create a ServiceWorkerProviderHost for a navigation. The |
61 // ServiceWorkerNetworkProvider will later be created in the renderer, should | 61 // ServiceWorkerNetworkProvider will later be created in the renderer, should |
62 // the navigation succeed. |is_parent_frame_is_secure| should be true for main | 62 // the navigation succeed. |is_parent_frame_is_secure| should be true for main |
63 // frames. Otherwise it is true iff all ancestor frames of this frame have a | 63 // frames. Otherwise it is true iff all ancestor frames of this frame have a |
64 // secure origin. | 64 // secure origin. |
65 static std::unique_ptr<ServiceWorkerProviderHost> PreCreateNavigationHost( | 65 static std::unique_ptr<ServiceWorkerProviderHost> PreCreateNavigationHost( |
66 base::WeakPtr<ServiceWorkerContextCore> context, | 66 base::WeakPtr<ServiceWorkerContextCore> context, |
| 67 const MojoURLLoaderFactoryGetter& url_loader_factory_getter, |
67 bool are_ancestors_secure); | 68 bool are_ancestors_secure); |
68 | 69 |
69 enum class FrameSecurityLevel { UNINITIALIZED, INSECURE, SECURE }; | 70 enum class FrameSecurityLevel { UNINITIALIZED, INSECURE, SECURE }; |
70 | 71 |
71 // When this provider host is for a Service Worker context, |route_id| is | 72 // When this provider host is for a Service Worker context, |route_id| is |
72 // MSG_ROUTING_NONE. When this provider host is for a Document, | 73 // MSG_ROUTING_NONE. When this provider host is for a Document, |
73 // |route_id| is the frame ID of the Document. When this provider host is for | 74 // |route_id| is the frame ID of the Document. When this provider host is for |
74 // a Shared Worker, |route_id| is the Shared Worker route ID. | 75 // a Shared Worker, |route_id| is the Shared Worker route ID. |
75 // |provider_type| gives additional information whether the provider is | 76 // |provider_type| gives additional information whether the provider is |
76 // created for controller (ServiceWorker) or controllee (Document or | 77 // created for controller (ServiceWorker) or controllee (Document or |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 // starts with. It is empty if IsContextSecureForServiceWorker() is | 365 // starts with. It is empty if IsContextSecureForServiceWorker() is |
365 // false. | 366 // false. |
366 ServiceWorkerRegistrationMap matching_registrations_; | 367 ServiceWorkerRegistrationMap matching_registrations_; |
367 | 368 |
368 std::unique_ptr<OneShotGetReadyCallback> get_ready_callback_; | 369 std::unique_ptr<OneShotGetReadyCallback> get_ready_callback_; |
369 scoped_refptr<ServiceWorkerVersion> controlling_version_; | 370 scoped_refptr<ServiceWorkerVersion> controlling_version_; |
370 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; | 371 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; |
371 base::WeakPtr<ServiceWorkerContextCore> context_; | 372 base::WeakPtr<ServiceWorkerContextCore> context_; |
372 ServiceWorkerDispatcherHost* dispatcher_host_; | 373 ServiceWorkerDispatcherHost* dispatcher_host_; |
373 bool allow_association_; | 374 bool allow_association_; |
| 375 MojoURLLoaderFactoryGetter url_loader_factory_getter_; |
374 | 376 |
375 std::vector<base::Closure> queued_events_; | 377 std::vector<base::Closure> queued_events_; |
376 | 378 |
377 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 379 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
378 }; | 380 }; |
379 | 381 |
380 } // namespace content | 382 } // namespace content |
381 | 383 |
382 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 384 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |