| Index: third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h
|
| diff --git a/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h b/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h
|
| index 98e7c440390a4af4310e155e1c9a1e787e4c4409..6c3ab85ffa44346cc8e0c090ba1fd4334089500e 100644
|
| --- a/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h
|
| +++ b/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h
|
| @@ -6,6 +6,7 @@
|
| #define FetchEvent_h
|
|
|
| #include "bindings/core/v8/ScriptPromise.h"
|
| +#include "bindings/core/v8/ScriptPromiseProperty.h"
|
| #include "modules/EventModules.h"
|
| #include "modules/ModulesExport.h"
|
| #include "modules/fetch/Request.h"
|
| @@ -14,11 +15,13 @@
|
| #include "modules/serviceworkers/RespondWithObserver.h"
|
| #include "modules/serviceworkers/WaitUntilObserver.h"
|
| #include "platform/heap/Handle.h"
|
| +#include "public/platform/modules/serviceworker/WebServiceWorkerPreloadResponseCallbacks.h"
|
|
|
| namespace blink {
|
|
|
| class ExceptionState;
|
| class Request;
|
| +class Response;
|
| class RespondWithObserver;
|
|
|
| // A fetch event is dispatched by the client to a service worker's script
|
| @@ -28,6 +31,10 @@ class MODULES_EXPORT FetchEvent final : public ExtendableEvent {
|
| DEFINE_WRAPPERTYPEINFO();
|
|
|
| public:
|
| + typedef ScriptPromiseProperty<Member<FetchEvent>,
|
| + Member<Response>,
|
| + Member<DOMException>>
|
| + PreloadResponseProperty;
|
| static FetchEvent* create(ScriptState*,
|
| const AtomicString& type,
|
| const FetchEventInit&);
|
| @@ -35,13 +42,18 @@ class MODULES_EXPORT FetchEvent final : public ExtendableEvent {
|
| const AtomicString& type,
|
| const FetchEventInit&,
|
| RespondWithObserver*,
|
| - WaitUntilObserver*);
|
| + WaitUntilObserver*,
|
| + bool navigationPreloadSent);
|
|
|
| Request* request() const;
|
| String clientId() const;
|
| bool isReload() const;
|
|
|
| void respondWith(ScriptState*, ScriptPromise, ExceptionState&);
|
| + ScriptPromise navigationPreload(ScriptState*, bool& isNull);
|
| +
|
| + std::unique_ptr<WebServiceWorkerPreloadResponseCallbacks>
|
| + createPreloadResponseCallback(ScriptState*);
|
|
|
| const AtomicString& interfaceName() const override;
|
|
|
| @@ -52,11 +64,15 @@ class MODULES_EXPORT FetchEvent final : public ExtendableEvent {
|
| const AtomicString& type,
|
| const FetchEventInit&,
|
| RespondWithObserver*,
|
| - WaitUntilObserver*);
|
| + WaitUntilObserver*,
|
| + bool navigationPreloadSent);
|
|
|
| private:
|
| + class PreloadResponseCallbackImpl;
|
| +
|
| Member<RespondWithObserver> m_observer;
|
| Member<Request> m_request;
|
| + Member<PreloadResponseProperty> m_navigationPreloadProperty;
|
| String m_clientId;
|
| bool m_isReload;
|
| };
|
|
|