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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 // ServiceWorkerContext implementation: | 67 // ServiceWorkerContext implementation: |
68 virtual void RegisterServiceWorker( | 68 virtual void RegisterServiceWorker( |
69 const GURL& pattern, | 69 const GURL& pattern, |
70 const GURL& script_url, | 70 const GURL& script_url, |
71 const ResultCallback& continuation) OVERRIDE; | 71 const ResultCallback& continuation) OVERRIDE; |
72 virtual void UnregisterServiceWorker(const GURL& pattern, | 72 virtual void UnregisterServiceWorker(const GURL& pattern, |
73 const ResultCallback& continuation) | 73 const ResultCallback& continuation) |
74 OVERRIDE; | 74 OVERRIDE; |
75 virtual void Terminate() OVERRIDE; | 75 virtual void Terminate() OVERRIDE; |
76 virtual void GetAllOriginsInfo(const GetUsageInfoCallback& callback) OVERRIDE; | 76 virtual void GetAllOriginsInfo(const GetUsageInfoCallback& callback) OVERRIDE; |
77 // Callback is called on the IO thread. | |
78 void DeleteForOrigin(const GURL& origin_url, const ResultCallback& done); | |
jsbell
2014/10/08 19:26:41
`done` is a bit unusual - it should probably be a
dmurph
2014/10/11 00:02:26
Done.
| |
77 virtual void DeleteForOrigin(const GURL& origin_url) OVERRIDE; | 79 virtual void DeleteForOrigin(const GURL& origin_url) OVERRIDE; |
78 | 80 |
79 void AddObserver(ServiceWorkerContextObserver* observer); | 81 void AddObserver(ServiceWorkerContextObserver* observer); |
80 void RemoveObserver(ServiceWorkerContextObserver* observer); | 82 void RemoveObserver(ServiceWorkerContextObserver* observer); |
81 | 83 |
82 bool is_incognito() const { return is_incognito_; } | 84 bool is_incognito() const { return is_incognito_; } |
83 | 85 |
84 // The URLRequestContext doesn't exist until after the StoragePartition is | 86 // The URLRequestContext doesn't exist until after the StoragePartition is |
85 // made (which is after this object is made). This function must be called | 87 // made (which is after this object is made). This function must be called |
86 // after this object is created but before any ServiceWorkerCache operations. | 88 // after this object is created but before any ServiceWorkerCache operations. |
(...skipping 18 matching lines...) Expand all Loading... | |
105 storage::QuotaManagerProxy* quota_manager_proxy); | 107 storage::QuotaManagerProxy* quota_manager_proxy); |
106 void ShutdownOnIO(); | 108 void ShutdownOnIO(); |
107 | 109 |
108 void DidDeleteAndStartOver(ServiceWorkerStatusCode status); | 110 void DidDeleteAndStartOver(ServiceWorkerStatusCode status); |
109 | 111 |
110 void DidGetAllRegistrationsForGetAllOrigins( | 112 void DidGetAllRegistrationsForGetAllOrigins( |
111 const GetUsageInfoCallback& callback, | 113 const GetUsageInfoCallback& callback, |
112 const std::vector<ServiceWorkerRegistrationInfo>& registrations); | 114 const std::vector<ServiceWorkerRegistrationInfo>& registrations); |
113 void DidGetAllRegistrationsForDeleteForOrigin( | 115 void DidGetAllRegistrationsForDeleteForOrigin( |
114 const GURL& origin, | 116 const GURL& origin, |
117 const ResultCallback& done, | |
jsbell
2014/10/08 19:26:41
nit: callbacks usually come first or last... is th
dmurph
2014/10/11 00:02:26
Done.
| |
115 const std::vector<ServiceWorkerRegistrationInfo>& registrations); | 118 const std::vector<ServiceWorkerRegistrationInfo>& registrations); |
116 | 119 |
117 const scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> > | 120 const scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> > |
118 observer_list_; | 121 observer_list_; |
119 const scoped_ptr<ServiceWorkerProcessManager> process_manager_; | 122 const scoped_ptr<ServiceWorkerProcessManager> process_manager_; |
120 // Cleared in Shutdown(): | 123 // Cleared in Shutdown(): |
121 scoped_ptr<ServiceWorkerContextCore> context_core_; | 124 scoped_ptr<ServiceWorkerContextCore> context_core_; |
122 | 125 |
123 // Initialized in Init(); true of the user data directory is empty. | 126 // Initialized in Init(); true of the user data directory is empty. |
124 bool is_incognito_; | 127 bool is_incognito_; |
125 }; | 128 }; |
126 | 129 |
127 } // namespace content | 130 } // namespace content |
128 | 131 |
129 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 132 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
OLD | NEW |