| 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 "modules/EventModules.h" | 9 #include "modules/EventModules.h" |
| 10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // context. RespondWithObserver can be used to notify the client about the | 24 // context. RespondWithObserver can be used to notify the client about the |
| 25 // service worker's response. | 25 // service worker's response. |
| 26 class MODULES_EXPORT FetchEvent final : public ExtendableEvent { | 26 class MODULES_EXPORT FetchEvent final : public ExtendableEvent { |
| 27 DEFINE_WRAPPERTYPEINFO(); | 27 DEFINE_WRAPPERTYPEINFO(); |
| 28 public: | 28 public: |
| 29 static PassRefPtrWillBeRawPtr<FetchEvent> create(); | 29 static PassRefPtrWillBeRawPtr<FetchEvent> create(); |
| 30 static PassRefPtrWillBeRawPtr<FetchEvent> create(const AtomicString& type, c
onst FetchEventInit&); | 30 static PassRefPtrWillBeRawPtr<FetchEvent> create(const AtomicString& type, c
onst FetchEventInit&); |
| 31 static PassRefPtrWillBeRawPtr<FetchEvent> create(const AtomicString& type, c
onst FetchEventInit&, RespondWithObserver*); | 31 static PassRefPtrWillBeRawPtr<FetchEvent> create(const AtomicString& type, c
onst FetchEventInit&, RespondWithObserver*); |
| 32 | 32 |
| 33 Request* request() const; | 33 Request* request() const; |
| 34 String clientId() const; | |
| 35 bool isReload() const; | 34 bool isReload() const; |
| 36 | 35 |
| 37 void respondWith(ScriptState*, ScriptPromise, ExceptionState&); | 36 void respondWith(ScriptState*, ScriptPromise, ExceptionState&); |
| 38 | 37 |
| 39 const AtomicString& interfaceName() const override; | 38 const AtomicString& interfaceName() const override; |
| 40 | 39 |
| 41 DECLARE_VIRTUAL_TRACE(); | 40 DECLARE_VIRTUAL_TRACE(); |
| 42 | 41 |
| 43 protected: | 42 protected: |
| 44 FetchEvent(); | 43 FetchEvent(); |
| 45 FetchEvent(const AtomicString& type, const FetchEventInit&, RespondWithObser
ver*); | 44 FetchEvent(const AtomicString& type, const FetchEventInit&, RespondWithObser
ver*); |
| 46 | 45 |
| 47 private: | 46 private: |
| 48 PersistentWillBeMember<RespondWithObserver> m_observer; | 47 PersistentWillBeMember<RespondWithObserver> m_observer; |
| 49 PersistentWillBeMember<Request> m_request; | 48 PersistentWillBeMember<Request> m_request; |
| 50 String m_clientId; | |
| 51 bool m_isReload; | 49 bool m_isReload; |
| 52 }; | 50 }; |
| 53 | 51 |
| 54 } // namespace blink | 52 } // namespace blink |
| 55 | 53 |
| 56 #endif // FetchEvent_h | 54 #endif // FetchEvent_h |
| OLD | NEW |