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

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

Issue 1294243004: PlzNavigate: Make ServiceWorker work with PlzNavigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 2 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_PROVIDER_HOST_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 void CompleteCrossSiteTransfer( 195 void CompleteCrossSiteTransfer(
196 int new_process_id, 196 int new_process_id,
197 int new_frame_id, 197 int new_frame_id,
198 int new_provider_id, 198 int new_provider_id,
199 ServiceWorkerProviderType new_provider_type, 199 ServiceWorkerProviderType new_provider_type,
200 ServiceWorkerDispatcherHost* dispatcher_host); 200 ServiceWorkerDispatcherHost* dispatcher_host);
201 ServiceWorkerDispatcherHost* dispatcher_host() const { 201 ServiceWorkerDispatcherHost* dispatcher_host() const {
202 return dispatcher_host_; 202 return dispatcher_host_;
203 } 203 }
204 204
205 // PlzNavigate
206 // Completes initialization of provider hosts used for navigation requests.
207 void CompleteNavigationInitialized(
208 int process_id,
209 int route_id,
nasko 2015/10/02 22:09:45 What object is this routing id for?
Fabrice (no longer in Chrome) 2015/10/06 17:21:38 Changed it to frame_routing_id but the other metho
210 ServiceWorkerDispatcherHost* dispatcher_host);
211
205 // Sends event messages to the renderer. Events for the worker are queued up 212 // Sends event messages to the renderer. Events for the worker are queued up
206 // until the worker thread id is known via SetReadyToSendMessagesToWorker(). 213 // until the worker thread id is known via SetReadyToSendMessagesToWorker().
207 void SendUpdateFoundMessage( 214 void SendUpdateFoundMessage(
208 int registration_handle_id); 215 int registration_handle_id);
209 void SendSetVersionAttributesMessage( 216 void SendSetVersionAttributesMessage(
210 int registration_handle_id, 217 int registration_handle_id,
211 ChangedVersionAttributesMask changed_mask, 218 ChangedVersionAttributesMask changed_mask,
212 ServiceWorkerVersion* installing_version, 219 ServiceWorkerVersion* installing_version,
213 ServiceWorkerVersion* waiting_version, 220 ServiceWorkerVersion* waiting_version,
214 ServiceWorkerVersion* active_version); 221 ServiceWorkerVersion* active_version);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 289
283 // Increase/decrease this host's process reference for |pattern|. 290 // Increase/decrease this host's process reference for |pattern|.
284 void IncreaseProcessReference(const GURL& pattern); 291 void IncreaseProcessReference(const GURL& pattern);
285 void DecreaseProcessReference(const GURL& pattern); 292 void DecreaseProcessReference(const GURL& pattern);
286 293
287 void ReturnRegistrationForReadyIfNeeded(); 294 void ReturnRegistrationForReadyIfNeeded();
288 295
289 bool IsReadyToSendMessages() const; 296 bool IsReadyToSendMessages() const;
290 void Send(IPC::Message* message) const; 297 void Send(IPC::Message* message) const;
291 298
299 // Finalizes cross-site transfers and navigation-initalized hosts.
300 void FinalizeInitialization(int process_id,
301 int frame_id,
nasko 2015/10/02 22:09:45 nit: frame_routing_id?
Fabrice (no longer in Chrome) 2015/10/06 17:21:38 Done.
302 ServiceWorkerDispatcherHost* dispatcher_host);
303
292 std::string client_uuid_; 304 std::string client_uuid_;
293 int render_process_id_; 305 int render_process_id_;
294 int route_id_; 306 int route_id_;
295 int render_thread_id_; 307 int render_thread_id_;
296 int provider_id_; 308 int provider_id_;
297 ServiceWorkerProviderType provider_type_; 309 ServiceWorkerProviderType provider_type_;
298 GURL document_url_; 310 GURL document_url_;
299 GURL topmost_frame_url_; 311 GURL topmost_frame_url_;
300 312
301 std::vector<GURL> associated_patterns_; 313 std::vector<GURL> associated_patterns_;
(...skipping 14 matching lines...) Expand all
316 bool allow_association_; 328 bool allow_association_;
317 329
318 std::vector<base::Closure> queued_events_; 330 std::vector<base::Closure> queued_events_;
319 331
320 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); 332 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost);
321 }; 333 };
322 334
323 } // namespace content 335 } // namespace content
324 336
325 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 337 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698