Index: third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h |
diff --git a/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h b/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h |
index 1028a5923fc0c8a281c4f294f958516a6837b193..443ac6df58ffba173195b251dd703aeb87200c57 100644 |
--- a/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h |
+++ b/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h |
@@ -31,6 +31,7 @@ |
#ifndef WebServiceWorkerContextProxy_h |
#define WebServiceWorkerContextProxy_h |
+#include "base/time/time.h" |
#include "public/platform/WebMessagePortChannel.h" |
#include "public/platform/modules/serviceworker/WebServiceWorker.h" |
#include "public/platform/modules/serviceworker/WebServiceWorkerRegistration.h" |
@@ -46,6 +47,7 @@ struct WebNotificationData; |
struct WebPaymentAppRequestData; |
struct WebServiceWorkerClientInfo; |
struct WebServiceWorkerError; |
+class WebURL; |
class WebURLResponse; |
// A proxy interface to talk to the worker's GlobalScope implementation. |
@@ -100,6 +102,13 @@ class WebServiceWorkerContextProxy { |
virtual void dispatchPaymentRequestEvent(int eventID, |
const WebPaymentAppRequestData&) = 0; |
+ // Called when the ServiceWorker received a FetchEvent which has triggered a |
+ // navigation preload request. |sentTimestamp| and |sentWallTime| are for |
+ // reporting to DevTools. |
+ virtual void onNavigationPreloadSent(int fetchEventID, |
+ const WebURL&, |
+ base::TimeTicks sentTimestamp, |
+ base::Time sentWallTime) = 0; |
virtual void onNavigationPreloadResponse( |
int fetchEventID, |
std::unique_ptr<WebURLResponse>, |
@@ -107,6 +116,8 @@ class WebServiceWorkerContextProxy { |
virtual void onNavigationPreloadError( |
int fetchEventID, |
std::unique_ptr<WebServiceWorkerError>) = 0; |
+ virtual void onNavigationPreloadCompleted(int fetchEventID, |
+ int64_t encodedDataLength) = 0; |
}; |
} // namespace blink |