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

Unified 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: Missed a spot. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_provider_host.h
diff --git a/content/browser/service_worker/service_worker_provider_host.h b/content/browser/service_worker/service_worker_provider_host.h
index 70ed349520841fb5d473d6f62c6b785a7d7ef8b6..e4802da3d903ee93e2f21627f7d6a2a5842844a6 100644
--- a/content/browser/service_worker/service_worker_provider_host.h
+++ b/content/browser/service_worker/service_worker_provider_host.h
@@ -52,6 +52,11 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
using GetRegistrationForReadyCallback =
base::Callback<void(ServiceWorkerRegistration* reigstration)>;
+ // PlzNavigate
+ // This value is used for the render_process_id for browser-initiated
+ // navigations.
+ static int kVirtualProcessIDForBrowserRequest;
michaeln 2015/10/01 23:11:12 please move this const to service_worker_types.h a
Fabrice (no longer in Chrome) 2015/10/02 16:37:34 Done.
+
// When this provider host is for a Service Worker context, |route_id| is
// MSG_ROUTING_NONE. When this provider host is for a Document,
// |route_id| is the frame ID of the Document. When this provider host is for
@@ -202,6 +207,13 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
return dispatcher_host_;
}
+ // PlzNavigate
+ // Completes initialization of provider hosts used for navigation requests.
+ void CompleteNavigationInitialized(
+ int process_id,
+ int route_id,
+ ServiceWorkerDispatcherHost* dispatcher_host);
+
// Sends event messages to the renderer. Events for the worker are queued up
// until the worker thread id is known via SetReadyToSendMessagesToWorker().
void SendUpdateFoundMessage(
@@ -289,6 +301,11 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
bool IsReadyToSendMessages() const;
void Send(IPC::Message* message) const;
+ // Finalizes cross-site transfers and navigation-initalized hosts.
+ void FinalizeInitialization(int process_id,
+ int frame_id,
+ ServiceWorkerDispatcherHost* dispatcher_host);
+
std::string client_uuid_;
int render_process_id_;
int route_id_;

Powered by Google App Engine
This is Rietveld 408576698