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

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

Issue 2888043006: ServiceWorker: Refactor CrossSiteTransfer on ServiceWorkerProviderHost (Closed)
Patch Set: Created 3 years, 7 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // |registration| claims the document to be controlled. 234 // |registration| claims the document to be controlled.
235 void ClaimedByRegistration(ServiceWorkerRegistration* registration); 235 void ClaimedByRegistration(ServiceWorkerRegistration* registration);
236 236
237 // Called by dispatcher host to get the registration for the "ready" property. 237 // Called by dispatcher host to get the registration for the "ready" property.
238 // Returns false if there's a completed or ongoing request for the document. 238 // Returns false if there's a completed or ongoing request for the document.
239 // https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#navigator- service-worker-ready 239 // https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#navigator- service-worker-ready
240 bool GetRegistrationForReady(const GetRegistrationForReadyCallback& callback); 240 bool GetRegistrationForReady(const GetRegistrationForReadyCallback& callback);
241 241
242 // Methods to support cross site navigations. 242 // Methods to support cross site navigations.
243 std::unique_ptr<ServiceWorkerProviderHost> PrepareForCrossSiteTransfer(); 243 std::unique_ptr<ServiceWorkerProviderHost> PrepareForCrossSiteTransfer();
244 void CompleteCrossSiteTransfer( 244 void CompleteCrossSiteTransfer(ServiceWorkerProviderHost* provisional_host);
245 int new_process_id,
246 int new_frame_id,
247 int new_provider_id,
248 ServiceWorkerProviderType new_provider_type,
249 ServiceWorkerDispatcherHost* dispatcher_host);
250 ServiceWorkerDispatcherHost* dispatcher_host() const { 245 ServiceWorkerDispatcherHost* dispatcher_host() const {
251 return dispatcher_host_; 246 return dispatcher_host_;
252 } 247 }
253 248
254 // PlzNavigate 249 // PlzNavigate
255 // Completes initialization of provider hosts used for navigation requests. 250 // Completes initialization of provider hosts used for navigation requests.
256 void CompleteNavigationInitialized( 251 void CompleteNavigationInitialized(
257 int process_id, 252 int process_id,
258 int frame_routing_id, 253 int frame_routing_id,
259 ServiceWorkerDispatcherHost* dispatcher_host); 254 ServiceWorkerDispatcherHost* dispatcher_host);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 std::unordered_map<mojom::ServiceWorkerWorkerClient*, 418 std::unordered_map<mojom::ServiceWorkerWorkerClient*,
424 mojom::ServiceWorkerWorkerClientAssociatedPtr> 419 mojom::ServiceWorkerWorkerClientAssociatedPtr>
425 worker_clients_; 420 worker_clients_;
426 421
427 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); 422 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost);
428 }; 423 };
429 424
430 } // namespace content 425 } // namespace content
431 426
432 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 427 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698