| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // these as provider_id is deeply wired everywhere) | 187 // these as provider_id is deeply wired everywhere) |
| 188 void RegisterProviderHostByClientID(const std::string& client_uuid, | 188 void RegisterProviderHostByClientID(const std::string& client_uuid, |
| 189 ServiceWorkerProviderHost* provider_host); | 189 ServiceWorkerProviderHost* provider_host); |
| 190 void UnregisterProviderHostByClientID(const std::string& client_uuid); | 190 void UnregisterProviderHostByClientID(const std::string& client_uuid); |
| 191 ServiceWorkerProviderHost* GetProviderHostByClientID( | 191 ServiceWorkerProviderHost* GetProviderHostByClientID( |
| 192 const std::string& client_uuid); | 192 const std::string& client_uuid); |
| 193 | 193 |
| 194 // A child process of |source_process_id| may be used to run the created | 194 // A child process of |source_process_id| may be used to run the created |
| 195 // worker for initial installation. | 195 // worker for initial installation. |
| 196 // Non-null |provider_host| must be given if this is called from a document. | 196 // Non-null |provider_host| must be given if this is called from a document. |
| 197 void RegisterServiceWorker(const GURL& pattern, | 197 void RegisterServiceWorker(const GURL& script_url, |
| 198 const GURL& script_url, | 198 const ServiceWorkerRegistrationOptions& options, |
| 199 ServiceWorkerProviderHost* provider_host, | 199 ServiceWorkerProviderHost* provider_host, |
| 200 const RegistrationCallback& callback); | 200 const RegistrationCallback& callback); |
| 201 void UnregisterServiceWorker(const GURL& pattern, | 201 void UnregisterServiceWorker(const GURL& pattern, |
| 202 const UnregistrationCallback& callback); | 202 const UnregistrationCallback& callback); |
| 203 | 203 |
| 204 // Callback is called issued after all unregistrations occur. The Status | 204 // Callback is called issued after all unregistrations occur. The Status |
| 205 // is populated as SERVICE_WORKER_OK if all succeed, or SERVICE_WORKER_FAILED | 205 // is populated as SERVICE_WORKER_OK if all succeed, or SERVICE_WORKER_FAILED |
| 206 // if any did not succeed. | 206 // if any did not succeed. |
| 207 void UnregisterServiceWorkers(const GURL& origin, | 207 void UnregisterServiceWorkers(const GURL& origin, |
| 208 const UnregistrationCallback& callback); | 208 const UnregistrationCallback& callback); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 scoped_refptr<base::ObserverListThreadSafe<ServiceWorkerContextObserver>> | 378 scoped_refptr<base::ObserverListThreadSafe<ServiceWorkerContextObserver>> |
| 379 observer_list_; | 379 observer_list_; |
| 380 base::WeakPtrFactory<ServiceWorkerContextCore> weak_factory_; | 380 base::WeakPtrFactory<ServiceWorkerContextCore> weak_factory_; |
| 381 | 381 |
| 382 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextCore); | 382 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextCore); |
| 383 }; | 383 }; |
| 384 | 384 |
| 385 } // namespace content | 385 } // namespace content |
| 386 | 386 |
| 387 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ | 387 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ |
| OLD | NEW |