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

Unified Diff: content/browser/service_worker/service_worker_dispatcher_host.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 side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_dispatcher_host.h
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.h b/content/browser/service_worker/service_worker_dispatcher_host.h
index f9cace41ce7bea263845f52475def8766b5b0cf5..6a4dd1b36998b5d1b748392f867463170811ff7e 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.h
+++ b/content/browser/service_worker/service_worker_dispatcher_host.h
@@ -24,6 +24,7 @@ class ServiceWorkerContextWrapper;
class ServiceWorkerHandle;
class ServiceWorkerProviderHost;
class ServiceWorkerRegistration;
+class ServiceWorkerRegistrationHandle;
class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
public:
@@ -47,6 +48,8 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
virtual bool Send(IPC::Message* message) OVERRIDE;
void RegisterServiceWorkerHandle(scoped_ptr<ServiceWorkerHandle> handle);
+ void RegisterServiceWorkerRegistrationHandle(
+ scoped_ptr<ServiceWorkerRegistrationHandle> handle);
MessagePortMessageFilter* message_port_message_filter() {
return message_port_message_filter_;
@@ -92,12 +95,19 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
const std::vector<int>& sent_message_port_ids);
void OnIncrementServiceWorkerRefCount(int handle_id);
void OnDecrementServiceWorkerRefCount(int handle_id);
+ void OnIncrementRegistrationRefCount(int registration_handle_id);
+ void OnDecrementRegistrationRefCount(int registration_handle_id);
void OnPostMessageToWorker(int handle_id,
const base::string16& message,
const std::vector<int>& sent_message_port_ids);
void OnServiceWorkerObjectDestroyed(int handle_id);
- ServiceWorkerHandle* FindHandle(int provider_id, int64 version_id);
+ ServiceWorkerHandle* FindHandle(
+ int provider_id,
+ int64 version_id);
+ ServiceWorkerRegistrationHandle* FindRegistrationHandle(
+ int provider_id,
+ int64 registration_id);
// Callbacks from ServiceWorkerContextCore
void RegistrationComplete(int thread_id,
@@ -122,6 +132,7 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
scoped_refptr<ServiceWorkerContextWrapper> context_wrapper_;
IDMap<ServiceWorkerHandle, IDMapOwnPointer> handles_;
+ IDMap<ServiceWorkerRegistrationHandle, IDMapOwnPointer> registration_handles_;
bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL.
ScopedVector<IPC::Message> pending_messages_;

Powered by Google App Engine
This is Rietveld 408576698