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

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: rebase 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(int provider_id, int64 registration_id);
76 // Corresponds to ServiceWorkerRegistration.unregister().
75 void UnregisterServiceWorker( 77 void UnregisterServiceWorker(
76 int provider_id, 78 int provider_id,
77 const GURL& pattern, 79 const GURL& pattern,
78 WebServiceWorkerUnregistrationCallbacks* callbacks); 80 WebServiceWorkerUnregistrationCallbacks* callbacks);
79 // Corresponds to navigator.serviceWorker.getRegistration() 81 // Corresponds to navigator.serviceWorker.getRegistration().
80 void GetRegistration( 82 void GetRegistration(
81 int provider_id, 83 int provider_id,
82 const GURL& document_url, 84 const GURL& document_url,
83 WebServiceWorkerRegistrationCallbacks* callbacks); 85 WebServiceWorkerRegistrationCallbacks* callbacks);
84 // Corresponds to navigator.serviceWorker.getRegistrations() 86 // Corresponds to navigator.serviceWorker.getRegistrations().
85 void GetRegistrations( 87 void GetRegistrations(
86 int provider_id, 88 int provider_id,
87 WebServiceWorkerGetRegistrationsCallbacks* callbacks); 89 WebServiceWorkerGetRegistrationsCallbacks* callbacks);
88 90
89 void GetRegistrationForReady( 91 void GetRegistrationForReady(
90 int provider_id, 92 int provider_id,
91 WebServiceWorkerGetRegistrationForReadyCallbacks* callbacks); 93 WebServiceWorkerGetRegistrationForReadyCallbacks* callbacks);
92 94
93 // Called when a new provider context for a document is created. Usually 95 // 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 96 // 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_; 274 WorkerToProviderMap worker_to_provider_;
273 275
274 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 276 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
275 277
276 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher); 278 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher);
277 }; 279 };
278 280
279 } // namespace content 281 } // namespace content
280 282
281 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ 283 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698