Chromium Code Reviews| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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& pattern, |
| 198 const GURL& script_url, | 198 const GURL& script_url, |
| 199 bool use_cache, | |
|
nhiroki
2017/03/24 00:33:42
Enum would be better than boolean for readability[
yuryu
2017/03/28 05:08:56
Done.
| |
| 199 ServiceWorkerProviderHost* provider_host, | 200 ServiceWorkerProviderHost* provider_host, |
| 200 const RegistrationCallback& callback); | 201 const RegistrationCallback& callback); |
| 201 void UnregisterServiceWorker(const GURL& pattern, | 202 void UnregisterServiceWorker(const GURL& pattern, |
| 202 const UnregistrationCallback& callback); | 203 const UnregistrationCallback& callback); |
| 203 | 204 |
| 204 // Callback is called issued after all unregistrations occur. The Status | 205 // Callback is called issued after all unregistrations occur. The Status |
| 205 // is populated as SERVICE_WORKER_OK if all succeed, or SERVICE_WORKER_FAILED | 206 // is populated as SERVICE_WORKER_OK if all succeed, or SERVICE_WORKER_FAILED |
| 206 // if any did not succeed. | 207 // if any did not succeed. |
| 207 void UnregisterServiceWorkers(const GURL& origin, | 208 void UnregisterServiceWorkers(const GURL& origin, |
| 208 const UnregistrationCallback& callback); | 209 const UnregistrationCallback& callback); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 378 scoped_refptr<base::ObserverListThreadSafe<ServiceWorkerContextObserver>> | 379 scoped_refptr<base::ObserverListThreadSafe<ServiceWorkerContextObserver>> |
| 379 observer_list_; | 380 observer_list_; |
| 380 base::WeakPtrFactory<ServiceWorkerContextCore> weak_factory_; | 381 base::WeakPtrFactory<ServiceWorkerContextCore> weak_factory_; |
| 381 | 382 |
| 382 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextCore); | 383 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextCore); |
| 383 }; | 384 }; |
| 384 | 385 |
| 385 } // namespace content | 386 } // namespace content |
| 386 | 387 |
| 387 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ | 388 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ |
| OLD | NEW |