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

Unified Diff: content/renderer/service_worker/service_worker_context_client.h

Issue 2416843002: Implement FetchEvent.navigationPreload (Closed)
Patch Set: incorporated falken's comment Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/service_worker/service_worker_context_client.h
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h
index 622ed930e1addf33f73b1cf960a923ab1d9f2847..7bbf1b84795f7ef251804523898403e4efa10a8a 100644
--- a/content/renderer/service_worker/service_worker_context_client.h
+++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -26,6 +26,7 @@
#include "services/service_manager/public/interfaces/interface_provider.mojom.h"
#include "third_party/WebKit/public/platform/WebMessagePortChannel.h"
#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerError.h"
+#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerPreloadResponseCallbacks.h"
#include "third_party/WebKit/public/platform/modules/serviceworker/service_worker_event_status.mojom.h"
#include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h"
#include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h"
@@ -193,6 +194,10 @@ class ServiceWorkerContextClient
void registerForeignFetchScopes(
const blink::WebVector<blink::WebURL>& sub_scopes,
const blink::WebVector<blink::WebSecurityOrigin>& origins) override;
+ void registerPreloadResponseCallback(
+ int eventID,
dcheng 2016/10/21 06:44:23 Nit: event_id
horo 2016/10/21 10:56:40 Done.
+ std::unique_ptr<blink::WebServiceWorkerPreloadResponseCallbacks>)
+ override;
virtual void DispatchSyncEvent(
const std::string& tag,
@@ -202,6 +207,7 @@ class ServiceWorkerContextClient
private:
struct WorkerContextData;
class FetchEventDispatcherImpl;
+ class NavigationPreloadRequest;
// Get routing_id for sending message to the ServiceWorkerVersion
// in the browser process.
@@ -218,9 +224,11 @@ class ServiceWorkerContextClient
int request_id,
const ServiceWorkerMsg_ExtendableMessageEvent_Params& params);
void OnInstallEvent(int request_id);
- void DispatchFetchEvent(int fetch_event_id,
- const ServiceWorkerFetchRequest& request,
- const FetchCallback& callback);
+ void DispatchFetchEvent(
+ int fetch_event_id,
+ const ServiceWorkerFetchRequest& request,
+ std::unique_ptr<NavigationPreloadRequest> preload_request,
+ const FetchCallback& callback);
void OnNotificationClickEvent(
int request_id,
const std::string& notification_id,

Powered by Google App Engine
This is Rietveld 408576698