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

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

Issue 2416843002: Implement FetchEvent.navigationPreload (Closed)
Patch Set: stop using nullable promise 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
« no previous file with comments | « no previous file | content/renderer/service_worker/service_worker_context_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4f6220a221f95a9823d86498df6b1202f940dcca 100644
--- a/content/renderer/service_worker/service_worker_context_client.h
+++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -39,10 +39,12 @@ class TaskRunner;
}
namespace blink {
+class WebDataConsumerHandle;
class WebDataSource;
struct WebServiceWorkerClientQueryOptions;
class WebServiceWorkerContextProxy;
class WebServiceWorkerProvider;
+class WebServiceWorkerResponse;
struct WebSyncRegistration;
}
@@ -202,6 +204,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 +221,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,
@@ -251,6 +256,14 @@ class ServiceWorkerContextClient
const base::string16& message);
void OnPing();
+ void OnNavigationPreloadResponse(
+ int fetch_event_id,
+ std::unique_ptr<blink::WebServiceWorkerResponse> response,
+ std::unique_ptr<blink::WebDataConsumerHandle> data_consumer_handle);
+ void OnNavigationPreloadError(
+ int fetch_event_id,
+ std::unique_ptr<blink::WebServiceWorkerError> error);
+
base::WeakPtr<ServiceWorkerContextClient> GetWeakPtr();
const int embedded_worker_id_;
« no previous file with comments | « no previous file | content/renderer/service_worker/service_worker_context_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698