| 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_CORE_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // these as provider_id is deeply wired everywhere) | 191 // these as provider_id is deeply wired everywhere) |
| 192 void RegisterProviderHostByClientID(const std::string& client_uuid, | 192 void RegisterProviderHostByClientID(const std::string& client_uuid, |
| 193 ServiceWorkerProviderHost* provider_host); | 193 ServiceWorkerProviderHost* provider_host); |
| 194 void UnregisterProviderHostByClientID(const std::string& client_uuid); | 194 void UnregisterProviderHostByClientID(const std::string& client_uuid); |
| 195 ServiceWorkerProviderHost* GetProviderHostByClientID( | 195 ServiceWorkerProviderHost* GetProviderHostByClientID( |
| 196 const std::string& client_uuid); | 196 const std::string& client_uuid); |
| 197 | 197 |
| 198 // A child process of |source_process_id| may be used to run the created | 198 // A child process of |source_process_id| may be used to run the created |
| 199 // worker for initial installation. | 199 // worker for initial installation. |
| 200 // Non-null |provider_host| must be given if this is called from a document. | 200 // Non-null |provider_host| must be given if this is called from a document. |
| 201 void RegisterServiceWorker(const GURL& pattern, | 201 void RegisterServiceWorker(const GURL& script_url, |
| 202 const GURL& script_url, | 202 const ServiceWorkerRegistrationOptions& options, |
| 203 ServiceWorkerProviderHost* provider_host, | 203 ServiceWorkerProviderHost* provider_host, |
| 204 const RegistrationCallback& callback); | 204 const RegistrationCallback& callback); |
| 205 void UnregisterServiceWorker(const GURL& pattern, | 205 void UnregisterServiceWorker(const GURL& pattern, |
| 206 const UnregistrationCallback& callback); | 206 const UnregistrationCallback& callback); |
| 207 | 207 |
| 208 // Callback is called issued after all unregistrations occur. The Status | 208 // Callback is called issued after all unregistrations occur. The Status |
| 209 // is populated as SERVICE_WORKER_OK if all succeed, or SERVICE_WORKER_FAILED | 209 // is populated as SERVICE_WORKER_OK if all succeed, or SERVICE_WORKER_FAILED |
| 210 // if any did not succeed. | 210 // if any did not succeed. |
| 211 void UnregisterServiceWorkers(const GURL& origin, | 211 void UnregisterServiceWorkers(const GURL& origin, |
| 212 const UnregistrationCallback& callback); | 212 const UnregistrationCallback& callback); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 scoped_refptr<base::ObserverListThreadSafe<ServiceWorkerContextCoreObserver>> | 390 scoped_refptr<base::ObserverListThreadSafe<ServiceWorkerContextCoreObserver>> |
| 391 observer_list_; | 391 observer_list_; |
| 392 base::WeakPtrFactory<ServiceWorkerContextCore> weak_factory_; | 392 base::WeakPtrFactory<ServiceWorkerContextCore> weak_factory_; |
| 393 | 393 |
| 394 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextCore); | 394 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextCore); |
| 395 }; | 395 }; |
| 396 | 396 |
| 397 } // namespace content | 397 } // namespace content |
| 398 | 398 |
| 399 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ | 399 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ |
| OLD | NEW |