Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: content/browser/service_worker/service_worker_context_core.h

Issue 463013002: ServiceWorker: Implement updatefound event and version attributes (Chromium) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address for comments Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_context_core.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 ServiceWorkerRegistration* GetLiveRegistration(int64 registration_id); 157 ServiceWorkerRegistration* GetLiveRegistration(int64 registration_id);
158 void AddLiveRegistration(ServiceWorkerRegistration* registration); 158 void AddLiveRegistration(ServiceWorkerRegistration* registration);
159 void RemoveLiveRegistration(int64 registration_id); 159 void RemoveLiveRegistration(int64 registration_id);
160 ServiceWorkerVersion* GetLiveVersion(int64 version_id); 160 ServiceWorkerVersion* GetLiveVersion(int64 version_id);
161 void AddLiveVersion(ServiceWorkerVersion* version); 161 void AddLiveVersion(ServiceWorkerVersion* version);
162 void RemoveLiveVersion(int64 registration_id); 162 void RemoveLiveVersion(int64 registration_id);
163 163
164 std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo(); 164 std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo();
165 std::vector<ServiceWorkerVersionInfo> GetAllLiveVersionInfo(); 165 std::vector<ServiceWorkerVersionInfo> GetAllLiveVersionInfo();
166 166
167 // Returns new context-local unique ID for ServiceWorkerHandle. 167 // Returns new context-local unique ID.
168 int GetNewServiceWorkerHandleId(); 168 int GetNewServiceWorkerHandleId();
169 int GetNewRegistrationHandleId();
169 170
170 void ScheduleDeleteAndStartOver() const; 171 void ScheduleDeleteAndStartOver() const;
171 172
172 // Deletes all files on disk and restarts the system. This leaves the system 173 // Deletes all files on disk and restarts the system. This leaves the system
173 // in a disabled state until it's done. 174 // in a disabled state until it's done.
174 void DeleteAndStartOver(const StatusCallback& callback); 175 void DeleteAndStartOver(const StatusCallback& callback);
175 176
176 base::WeakPtr<ServiceWorkerContextCore> AsWeakPtr() { 177 base::WeakPtr<ServiceWorkerContextCore> AsWeakPtr() {
177 return weak_factory_.GetWeakPtr(); 178 return weak_factory_.GetWeakPtr();
178 } 179 }
(...skipping 22 matching lines...) Expand all
201 // Bind() to hold a reference to |wrapper_| until |this| is fully destroyed. 202 // Bind() to hold a reference to |wrapper_| until |this| is fully destroyed.
202 ServiceWorkerContextWrapper* wrapper_; 203 ServiceWorkerContextWrapper* wrapper_;
203 scoped_ptr<ProcessToProviderMap> providers_; 204 scoped_ptr<ProcessToProviderMap> providers_;
204 scoped_ptr<ServiceWorkerStorage> storage_; 205 scoped_ptr<ServiceWorkerStorage> storage_;
205 scoped_ptr<ServiceWorkerCacheStorageManager> cache_manager_; 206 scoped_ptr<ServiceWorkerCacheStorageManager> cache_manager_;
206 scoped_refptr<EmbeddedWorkerRegistry> embedded_worker_registry_; 207 scoped_refptr<EmbeddedWorkerRegistry> embedded_worker_registry_;
207 scoped_ptr<ServiceWorkerJobCoordinator> job_coordinator_; 208 scoped_ptr<ServiceWorkerJobCoordinator> job_coordinator_;
208 std::map<int64, ServiceWorkerRegistration*> live_registrations_; 209 std::map<int64, ServiceWorkerRegistration*> live_registrations_;
209 std::map<int64, ServiceWorkerVersion*> live_versions_; 210 std::map<int64, ServiceWorkerVersion*> live_versions_;
210 int next_handle_id_; 211 int next_handle_id_;
212 int next_registration_handle_id_;
211 scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> > 213 scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> >
212 observer_list_; 214 observer_list_;
213 215
214 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextCore); 216 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextCore);
215 }; 217 };
216 218
217 } // namespace content 219 } // namespace content
218 220
219 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ 221 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_context_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698