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

Side by Side Diff: content/child/service_worker/service_worker_dispatcher.h

Issue 1175823002: ServiceWorker: Implement ServiceWorkerRegistration.update() (2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address kinuko@'s comments Created 5 years, 6 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_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 typedef blink::WebServiceWorkerProvider:: 58 typedef blink::WebServiceWorkerProvider::
59 WebServiceWorkerGetRegistrationForReadyCallbacks 59 WebServiceWorkerGetRegistrationForReadyCallbacks
60 WebServiceWorkerGetRegistrationForReadyCallbacks; 60 WebServiceWorkerGetRegistrationForReadyCallbacks;
61 61
62 explicit ServiceWorkerDispatcher(ThreadSafeSender* thread_safe_sender); 62 explicit ServiceWorkerDispatcher(ThreadSafeSender* thread_safe_sender);
63 ~ServiceWorkerDispatcher() override; 63 ~ServiceWorkerDispatcher() override;
64 64
65 void OnMessageReceived(const IPC::Message& msg); 65 void OnMessageReceived(const IPC::Message& msg);
66 bool Send(IPC::Message* msg); 66 bool Send(IPC::Message* msg);
67 67
68 // Corresponds to navigator.serviceWorker.register() 68 // Corresponds to navigator.serviceWorker.register().
69 void RegisterServiceWorker( 69 void RegisterServiceWorker(
70 int provider_id, 70 int provider_id,
71 const GURL& pattern, 71 const GURL& pattern,
72 const GURL& script_url, 72 const GURL& script_url,
73 WebServiceWorkerRegistrationCallbacks* callbacks); 73 WebServiceWorkerRegistrationCallbacks* callbacks);
74 // Corresponds to navigator.serviceWorker.unregister() 74 // Corresponds to ServiceWorkerRegistration.update().
75 void UpdateServiceWorker(
76 int provider_id,
77 int64 registration_id);
78 // Corresponds to ServiceWorkerRegistration.unregister().
75 void UnregisterServiceWorker( 79 void UnregisterServiceWorker(
76 int provider_id, 80 int provider_id,
77 const GURL& pattern, 81 const GURL& pattern,
78 WebServiceWorkerUnregistrationCallbacks* callbacks); 82 WebServiceWorkerUnregistrationCallbacks* callbacks);
79 // Corresponds to navigator.serviceWorker.getRegistration() 83 // Corresponds to navigator.serviceWorker.getRegistration().
80 void GetRegistration( 84 void GetRegistration(
81 int provider_id, 85 int provider_id,
82 const GURL& document_url, 86 const GURL& document_url,
83 WebServiceWorkerRegistrationCallbacks* callbacks); 87 WebServiceWorkerRegistrationCallbacks* callbacks);
84 // Corresponds to navigator.serviceWorker.getRegistrations() 88 // Corresponds to navigator.serviceWorker.getRegistrations().
85 void GetRegistrations( 89 void GetRegistrations(
86 int provider_id, 90 int provider_id,
87 WebServiceWorkerGetRegistrationsCallbacks* callbacks); 91 WebServiceWorkerGetRegistrationsCallbacks* callbacks);
88 92
89 void GetRegistrationForReady( 93 void GetRegistrationForReady(
90 int provider_id, 94 int provider_id,
91 WebServiceWorkerGetRegistrationForReadyCallbacks* callbacks); 95 WebServiceWorkerGetRegistrationForReadyCallbacks* callbacks);
92 96
93 // Called when a new provider context for a document is created. Usually 97 // Called when a new provider context for a document is created. Usually
94 // this happens when a new document is being loaded, and is called much 98 // this happens when a new document is being loaded, and is called much
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 WorkerToProviderMap worker_to_provider_; 276 WorkerToProviderMap worker_to_provider_;
273 277
274 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 278 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
275 279
276 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher); 280 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher);
277 }; 281 };
278 282
279 } // namespace content 283 } // namespace content
280 284
281 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ 285 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698