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

Side by Side Diff: content/browser/service_worker/service_worker_dispatcher_host.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_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 friend class BrowserThread; 81 friend class BrowserThread;
82 friend class base::DeleteHelper<ServiceWorkerDispatcherHost>; 82 friend class base::DeleteHelper<ServiceWorkerDispatcherHost>;
83 friend class TestingServiceWorkerDispatcherHost; 83 friend class TestingServiceWorkerDispatcherHost;
84 84
85 // IPC Message handlers 85 // IPC Message handlers
86 void OnRegisterServiceWorker(int thread_id, 86 void OnRegisterServiceWorker(int thread_id,
87 int request_id, 87 int request_id,
88 int provider_id, 88 int provider_id,
89 const GURL& pattern, 89 const GURL& pattern,
90 const GURL& script_url); 90 const GURL& script_url);
91 void OnUpdateServiceWorker(int provider_id, int64 registration_id);
91 void OnUnregisterServiceWorker(int thread_id, 92 void OnUnregisterServiceWorker(int thread_id,
92 int request_id, 93 int request_id,
93 int provider_id, 94 int provider_id,
94 const GURL& pattern); 95 const GURL& pattern);
95 void OnGetRegistration(int thread_id, 96 void OnGetRegistration(int thread_id,
96 int request_id, 97 int request_id,
97 int provider_id, 98 int provider_id,
98 const GURL& document_url); 99 const GURL& document_url);
99 void OnGetRegistrations(int thread_id, int request_id, int provider_id); 100 void OnGetRegistrations(int thread_id, int request_id, int provider_id);
100 void OnGetRegistrationForReady(int thread_id, 101 void OnGetRegistrationForReady(int thread_id,
(...skipping 25 matching lines...) Expand all
126 void OnDecrementServiceWorkerRefCount(int handle_id); 127 void OnDecrementServiceWorkerRefCount(int handle_id);
127 void OnIncrementRegistrationRefCount(int registration_handle_id); 128 void OnIncrementRegistrationRefCount(int registration_handle_id);
128 void OnDecrementRegistrationRefCount(int registration_handle_id); 129 void OnDecrementRegistrationRefCount(int registration_handle_id);
129 void OnPostMessageToWorker( 130 void OnPostMessageToWorker(
130 int handle_id, 131 int handle_id,
131 const base::string16& message, 132 const base::string16& message,
132 const std::vector<TransferredMessagePort>& sent_message_ports); 133 const std::vector<TransferredMessagePort>& sent_message_ports);
133 void OnServiceWorkerObjectDestroyed(int handle_id); 134 void OnServiceWorkerObjectDestroyed(int handle_id);
134 void OnTerminateWorker(int handle_id); 135 void OnTerminateWorker(int handle_id);
135 136
137 void DidFindRegistrationForUpdate(
138 const GURL& document_url,
139 ServiceWorkerStatusCode status,
140 const scoped_refptr<ServiceWorkerRegistration>& registration);
141
136 ServiceWorkerRegistrationHandle* FindRegistrationHandle( 142 ServiceWorkerRegistrationHandle* FindRegistrationHandle(
137 int provider_id, 143 int provider_id,
138 int64 registration_id); 144 int64 registration_id);
139 145
140 void GetRegistrationObjectInfoAndVersionAttributes( 146 void GetRegistrationObjectInfoAndVersionAttributes(
141 base::WeakPtr<ServiceWorkerProviderHost> provider_host, 147 base::WeakPtr<ServiceWorkerProviderHost> provider_host,
142 ServiceWorkerRegistration* registration, 148 ServiceWorkerRegistration* registration,
143 ServiceWorkerRegistrationObjectInfo* info, 149 ServiceWorkerRegistrationObjectInfo* info,
144 ServiceWorkerVersionAttributes* attrs); 150 ServiceWorkerVersionAttributes* attrs);
145 151
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 210
205 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. 211 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL.
206 ScopedVector<IPC::Message> pending_messages_; 212 ScopedVector<IPC::Message> pending_messages_;
207 213
208 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); 214 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost);
209 }; 215 };
210 216
211 } // namespace content 217 } // namespace content
212 218
213 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ 219 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698