| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 const GURL& script_url, | 78 const GURL& script_url, |
| 79 const ResultCallback& continuation) override; | 79 const ResultCallback& continuation) override; |
| 80 void UnregisterServiceWorker(const GURL& pattern, | 80 void UnregisterServiceWorker(const GURL& pattern, |
| 81 const ResultCallback& continuation) override; | 81 const ResultCallback& continuation) override; |
| 82 void CanHandleMainResourceOffline( | 82 void CanHandleMainResourceOffline( |
| 83 const GURL& url, | 83 const GURL& url, |
| 84 const GURL& first_party, | 84 const GURL& first_party, |
| 85 const net::CompletionCallback& callback) override; | 85 const net::CompletionCallback& callback) override; |
| 86 void GetAllOriginsInfo(const GetUsageInfoCallback& callback) override; | 86 void GetAllOriginsInfo(const GetUsageInfoCallback& callback) override; |
| 87 void DeleteForOrigin(const GURL& origin_url) override; | 87 void DeleteForOrigin(const GURL& origin_url) override; |
| 88 void CheckHasSameServiceWorker( |
| 89 const GURL& url, |
| 90 const GURL& other_url, |
| 91 const CheckHasSameServiceWorkerCallback& callback) override; |
| 88 | 92 |
| 89 // DeleteForOrigin with completion callback. Does not exit early, and returns | 93 // DeleteForOrigin with completion callback. Does not exit early, and returns |
| 90 // false if one or more of the deletions fail. | 94 // false if one or more of the deletions fail. |
| 91 virtual void DeleteForOrigin(const GURL& origin_url, | 95 virtual void DeleteForOrigin(const GURL& origin_url, |
| 92 const ResultCallback& done); | 96 const ResultCallback& done); |
| 93 | 97 |
| 94 void AddObserver(ServiceWorkerContextObserver* observer); | 98 void AddObserver(ServiceWorkerContextObserver* observer); |
| 95 void RemoveObserver(ServiceWorkerContextObserver* observer); | 99 void RemoveObserver(ServiceWorkerContextObserver* observer); |
| 96 | 100 |
| 97 bool is_incognito() const { return is_incognito_; } | 101 bool is_incognito() const { return is_incognito_; } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 122 storage::QuotaManagerProxy* quota_manager_proxy, | 126 storage::QuotaManagerProxy* quota_manager_proxy, |
| 123 storage::SpecialStoragePolicy* special_storage_policy); | 127 storage::SpecialStoragePolicy* special_storage_policy); |
| 124 void ShutdownOnIO(); | 128 void ShutdownOnIO(); |
| 125 | 129 |
| 126 void DidDeleteAndStartOver(ServiceWorkerStatusCode status); | 130 void DidDeleteAndStartOver(ServiceWorkerStatusCode status); |
| 127 | 131 |
| 128 void DidGetAllRegistrationsForGetAllOrigins( | 132 void DidGetAllRegistrationsForGetAllOrigins( |
| 129 const GetUsageInfoCallback& callback, | 133 const GetUsageInfoCallback& callback, |
| 130 const std::vector<ServiceWorkerRegistrationInfo>& registrations); | 134 const std::vector<ServiceWorkerRegistrationInfo>& registrations); |
| 131 | 135 |
| 136 void DidFindRegistrationForCheckHasSameServiceWorker( |
| 137 const GURL& other_url, |
| 138 const CheckHasSameServiceWorkerCallback& callback, |
| 139 ServiceWorkerStatusCode status, |
| 140 const scoped_refptr<ServiceWorkerRegistration>& registration); |
| 141 |
| 132 const scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> > | 142 const scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> > |
| 133 observer_list_; | 143 observer_list_; |
| 134 const scoped_ptr<ServiceWorkerProcessManager> process_manager_; | 144 const scoped_ptr<ServiceWorkerProcessManager> process_manager_; |
| 135 // Cleared in Shutdown(): | 145 // Cleared in Shutdown(): |
| 136 scoped_ptr<ServiceWorkerContextCore> context_core_; | 146 scoped_ptr<ServiceWorkerContextCore> context_core_; |
| 137 | 147 |
| 138 // Initialized in Init(); true if the user data directory is empty. | 148 // Initialized in Init(); true if the user data directory is empty. |
| 139 bool is_incognito_; | 149 bool is_incognito_; |
| 140 | 150 |
| 141 // Raw pointer to the StoragePartitionImpl owning |this|. | 151 // Raw pointer to the StoragePartitionImpl owning |this|. |
| 142 StoragePartitionImpl* storage_partition_; | 152 StoragePartitionImpl* storage_partition_; |
| 143 }; | 153 }; |
| 144 | 154 |
| 145 } // namespace content | 155 } // namespace content |
| 146 | 156 |
| 147 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 157 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
| OLD | NEW |