| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef FetchEvent_h | 5 #ifndef FetchEvent_h |
| 6 #define FetchEvent_h | 6 #define FetchEvent_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptPromiseProperty.h" | 9 #include "bindings/core/v8/ScriptPromiseProperty.h" |
| 10 #include "modules/EventModules.h" | 10 #include "modules/EventModules.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 const FetchEventInit&, | 45 const FetchEventInit&, |
| 46 RespondWithObserver*, | 46 RespondWithObserver*, |
| 47 WaitUntilObserver*, | 47 WaitUntilObserver*, |
| 48 bool navigationPreloadSent); | 48 bool navigationPreloadSent); |
| 49 | 49 |
| 50 Request* request() const; | 50 Request* request() const; |
| 51 String clientId() const; | 51 String clientId() const; |
| 52 bool isReload() const; | 52 bool isReload() const; |
| 53 | 53 |
| 54 void respondWith(ScriptState*, ScriptPromise, ExceptionState&); | 54 void respondWith(ScriptState*, ScriptPromise, ExceptionState&); |
| 55 ScriptPromise navigationPreload(ScriptState*); | 55 ScriptPromise preloadResponse(ScriptState*); |
| 56 | 56 |
| 57 void onNavigationPreloadResponse(std::unique_ptr<WebServiceWorkerResponse>, | 57 void onNavigationPreloadResponse(std::unique_ptr<WebServiceWorkerResponse>, |
| 58 std::unique_ptr<WebDataConsumerHandle>); | 58 std::unique_ptr<WebDataConsumerHandle>); |
| 59 void onNavigationPreloadError(std::unique_ptr<WebServiceWorkerError>); | 59 void onNavigationPreloadError(std::unique_ptr<WebServiceWorkerError>); |
| 60 | 60 |
| 61 const AtomicString& interfaceName() const override; | 61 const AtomicString& interfaceName() const override; |
| 62 | 62 |
| 63 DECLARE_VIRTUAL_TRACE(); | 63 DECLARE_VIRTUAL_TRACE(); |
| 64 | 64 |
| 65 protected: | 65 protected: |
| 66 FetchEvent(ScriptState*, | 66 FetchEvent(ScriptState*, |
| 67 const AtomicString& type, | 67 const AtomicString& type, |
| 68 const FetchEventInit&, | 68 const FetchEventInit&, |
| 69 RespondWithObserver*, | 69 RespondWithObserver*, |
| 70 WaitUntilObserver*, | 70 WaitUntilObserver*, |
| 71 bool navigationPreloadSent); | 71 bool navigationPreloadSent); |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 RefPtr<ScriptState> m_scriptState; | 74 RefPtr<ScriptState> m_scriptState; |
| 75 Member<RespondWithObserver> m_observer; | 75 Member<RespondWithObserver> m_observer; |
| 76 Member<Request> m_request; | 76 Member<Request> m_request; |
| 77 Member<PreloadResponseProperty> m_navigationPreloadProperty; | 77 Member<PreloadResponseProperty> m_preloadResponseProperty; |
| 78 String m_clientId; | 78 String m_clientId; |
| 79 bool m_isReload; | 79 bool m_isReload; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace blink | 82 } // namespace blink |
| 83 | 83 |
| 84 #endif // FetchEvent_h | 84 #endif // FetchEvent_h |
| OLD | NEW |