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 <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // case it will observe resource loads made directly by the service worker. | 44 // case it will observe resource loads made directly by the service worker. |
45 class CONTENT_EXPORT ServiceWorkerProviderHost | 45 class CONTENT_EXPORT ServiceWorkerProviderHost |
46 : public NON_EXPORTED_BASE(ServiceWorkerRegistration::Listener), | 46 : public NON_EXPORTED_BASE(ServiceWorkerRegistration::Listener), |
47 public base::SupportsWeakPtr<ServiceWorkerProviderHost> { | 47 public base::SupportsWeakPtr<ServiceWorkerProviderHost> { |
48 public: | 48 public: |
49 using GetClientInfoCallback = | 49 using GetClientInfoCallback = |
50 base::Callback<void(const ServiceWorkerClientInfo&)>; | 50 base::Callback<void(const ServiceWorkerClientInfo&)>; |
51 using GetRegistrationForReadyCallback = | 51 using GetRegistrationForReadyCallback = |
52 base::Callback<void(ServiceWorkerRegistration* reigstration)>; | 52 base::Callback<void(ServiceWorkerRegistration* reigstration)>; |
53 | 53 |
| 54 // PlzNavigate: We use this value as fake render_process_id for navigation |
| 55 // request. |
| 56 static int kVirtualProcessIDForNavigationRequest; |
| 57 |
54 // When this provider host is for a Service Worker context, |route_id| is | 58 // When this provider host is for a Service Worker context, |route_id| is |
55 // MSG_ROUTING_NONE. When this provider host is for a Document, | 59 // MSG_ROUTING_NONE. When this provider host is for a Document, |
56 // |route_id| is the frame ID of the Document. When this provider host is for | 60 // |route_id| is the frame ID of the Document. When this provider host is for |
57 // a Shared Worker, |route_id| is the Shared Worker route ID. | 61 // a Shared Worker, |route_id| is the Shared Worker route ID. |
58 // |provider_type| gives additional information whether the provider is | 62 // |provider_type| gives additional information whether the provider is |
59 // created for controller (ServiceWorker) or controllee (Document or | 63 // created for controller (ServiceWorker) or controllee (Document or |
60 // SharedWorker). | 64 // SharedWorker). |
61 ServiceWorkerProviderHost(int render_process_id, | 65 ServiceWorkerProviderHost(int render_process_id, |
62 int route_id, | 66 int route_id, |
63 int provider_id, | 67 int provider_id, |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 bool allow_association_; | 318 bool allow_association_; |
315 | 319 |
316 std::vector<base::Closure> queued_events_; | 320 std::vector<base::Closure> queued_events_; |
317 | 321 |
318 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 322 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
319 }; | 323 }; |
320 | 324 |
321 } // namespace content | 325 } // namespace content |
322 | 326 |
323 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 327 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |