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

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

Issue 1282013004: BackgroundSyncManager tracks client registrations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed test Created 5 years, 3 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
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_VERSION_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "base/callback.h" 15 #include "base/callback.h"
16 #include "base/gtest_prod_util.h" 16 #include "base/gtest_prod_util.h"
17 #include "base/id_map.h" 17 #include "base/id_map.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "base/memory/scoped_ptr.h" 19 #include "base/memory/scoped_ptr.h"
20 #include "base/observer_list.h" 20 #include "base/observer_list.h"
21 #include "base/timer/timer.h" 21 #include "base/timer/timer.h"
22 #include "content/browser/background_sync/background_sync_registration_handle.h"
22 #include "content/browser/service_worker/embedded_worker_instance.h" 23 #include "content/browser/service_worker/embedded_worker_instance.h"
23 #include "content/browser/service_worker/service_worker_script_cache_map.h" 24 #include "content/browser/service_worker/service_worker_script_cache_map.h"
24 #include "content/common/background_sync_service.mojom.h" 25 #include "content/common/background_sync_service.mojom.h"
25 #include "content/common/content_export.h" 26 #include "content/common/content_export.h"
26 #include "content/common/service_port_service.mojom.h" 27 #include "content/common/service_port_service.mojom.h"
27 #include "content/common/service_worker/service_worker_status_code.h" 28 #include "content/common/service_worker/service_worker_status_code.h"
28 #include "content/common/service_worker/service_worker_types.h" 29 #include "content/common/service_worker/service_worker_types.h"
29 #include "content/public/common/service_registry.h" 30 #include "content/public/common/service_registry.h"
30 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h" 31 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h"
31 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerEventResult.h" 32 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerEventResult.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // statuses will result in an error SERVICE_WORKER_ERROR_FAILED. 203 // statuses will result in an error SERVICE_WORKER_ERROR_FAILED.
203 void DispatchFetchEvent(const ServiceWorkerFetchRequest& request, 204 void DispatchFetchEvent(const ServiceWorkerFetchRequest& request,
204 const base::Closure& prepare_callback, 205 const base::Closure& prepare_callback,
205 const FetchCallback& fetch_callback); 206 const FetchCallback& fetch_callback);
206 207
207 // Sends sync event to the associated embedded worker and asynchronously calls 208 // Sends sync event to the associated embedded worker and asynchronously calls
208 // |callback| when it errors out or it gets a response from the worker to 209 // |callback| when it errors out or it gets a response from the worker to
209 // notify completion. 210 // notify completion.
210 // 211 //
211 // This must be called when the status() is ACTIVATED. 212 // This must be called when the status() is ACTIVATED.
212 void DispatchSyncEvent(SyncRegistrationPtr registration, 213 void DispatchSyncEvent(BackgroundSyncRegistrationHandle::HandleId handle_id,
213 const StatusCallback& callback); 214 const StatusCallback& callback);
214 215
215 // Sends notificationclick event to the associated embedded worker and 216 // Sends notificationclick event to the associated embedded worker and
216 // asynchronously calls |callback| when it errors out or it gets a response 217 // asynchronously calls |callback| when it errors out or it gets a response
217 // from the worker to notify completion. 218 // from the worker to notify completion.
218 // 219 //
219 // This must be called when the status() is ACTIVATED. 220 // This must be called when the status() is ACTIVATED.
220 void DispatchNotificationClickEvent( 221 void DispatchNotificationClickEvent(
221 const StatusCallback& callback, 222 const StatusCallback& callback,
222 int64_t persistent_notification_id, 223 int64_t persistent_notification_id,
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 const bool should_exclude_from_uma_ = false; 634 const bool should_exclude_from_uma_ = false;
634 635
635 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; 636 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_;
636 637
637 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); 638 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion);
638 }; 639 };
639 640
640 } // namespace content 641 } // namespace content
641 642
642 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 643 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_browsertest.cc ('k') | content/browser/service_worker/service_worker_version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698