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_CONTEXT_WRAPPER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
17 #include "content/browser/service_worker/service_worker_context_core.h" | 17 #include "content/browser/service_worker/service_worker_context_core.h" |
18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
| 19 #include "content/common/worker_url_loader_factory_provider.mojom.h" |
19 #include "content/public/browser/service_worker_context.h" | 20 #include "content/public/browser/service_worker_context.h" |
20 | 21 |
21 namespace base { | 22 namespace base { |
22 class FilePath; | 23 class FilePath; |
23 class SingleThreadTaskRunner; | 24 class SingleThreadTaskRunner; |
24 } | 25 } |
25 | 26 |
26 namespace storage { | 27 namespace storage { |
27 class QuotaManagerProxy; | 28 class QuotaManagerProxy; |
28 class SpecialStoragePolicy; | 29 class SpecialStoragePolicy; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 void UpdateRegistration(const GURL& pattern); | 212 void UpdateRegistration(const GURL& pattern); |
212 void SetForceUpdateOnPageLoad(bool force_update_on_page_load); | 213 void SetForceUpdateOnPageLoad(bool force_update_on_page_load); |
213 void AddObserver(ServiceWorkerContextObserver* observer); | 214 void AddObserver(ServiceWorkerContextObserver* observer); |
214 void RemoveObserver(ServiceWorkerContextObserver* observer); | 215 void RemoveObserver(ServiceWorkerContextObserver* observer); |
215 | 216 |
216 bool is_incognito() const { return is_incognito_; } | 217 bool is_incognito() const { return is_incognito_; } |
217 | 218 |
218 // Must be called from the IO thread. | 219 // Must be called from the IO thread. |
219 bool OriginHasForeignFetchRegistrations(const GURL& origin); | 220 bool OriginHasForeignFetchRegistrations(const GURL& origin); |
220 | 221 |
| 222 // Binds the ServiceWorkerWorkerClient of a dedicated (or shared) worker to |
| 223 // the parent frame's ServiceWorkerProviderHost. (This is used only when |
| 224 // off-main-thread-fetch is enabled.) |
| 225 void BindWorkerFetchContext( |
| 226 int render_process_id, |
| 227 int service_worker_provider_id, |
| 228 mojom::ServiceWorkerWorkerClientAssociatedPtrInfo client_ptr_info); |
| 229 |
221 private: | 230 private: |
222 friend class BackgroundSyncManagerTest; | 231 friend class BackgroundSyncManagerTest; |
223 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>; | 232 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>; |
224 friend class EmbeddedWorkerTestHelper; | 233 friend class EmbeddedWorkerTestHelper; |
225 friend class EmbeddedWorkerBrowserTest; | 234 friend class EmbeddedWorkerBrowserTest; |
226 friend class ForeignFetchRequestHandler; | 235 friend class ForeignFetchRequestHandler; |
227 friend class ServiceWorkerDispatcherHost; | 236 friend class ServiceWorkerDispatcherHost; |
228 friend class ServiceWorkerInternalsUI; | 237 friend class ServiceWorkerInternalsUI; |
229 friend class ServiceWorkerNavigationHandleCore; | 238 friend class ServiceWorkerNavigationHandleCore; |
230 friend class ServiceWorkerProcessManager; | 239 friend class ServiceWorkerProcessManager; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 | 292 |
284 // The ResourceContext associated with this context. | 293 // The ResourceContext associated with this context. |
285 ResourceContext* resource_context_; | 294 ResourceContext* resource_context_; |
286 | 295 |
287 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); | 296 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); |
288 }; | 297 }; |
289 | 298 |
290 } // namespace content | 299 } // namespace content |
291 | 300 |
292 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 301 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
OLD | NEW |