| 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 RespondWithObserver_h | 5 #ifndef RespondWithObserver_h |
| 6 #define RespondWithObserver_h | 6 #define RespondWithObserver_h |
| 7 | 7 |
| 8 #include "core/dom/ContextLifecycleObserver.h" | 8 #include "core/dom/ContextLifecycleObserver.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "public/platform/WebURLRequest.h" | 10 #include "public/platform/WebURLRequest.h" |
| 11 #include "wtf/Forward.h" | |
| 12 #include "wtf/RefCounted.h" | |
| 13 | 11 |
| 14 namespace blink { | 12 namespace blink { |
| 15 | 13 |
| 16 class ExceptionState; | 14 class ExceptionState; |
| 17 class ExecutionContext; | 15 class ExecutionContext; |
| 18 class Response; | |
| 19 class ScriptState; | 16 class ScriptState; |
| 20 class ScriptValue; | 17 class ScriptValue; |
| 21 | 18 |
| 22 // This class observes the service worker's handling of a FetchEvent and | 19 // This class observes the service worker's handling of a FetchEvent and |
| 23 // notifies the client. | 20 // notifies the client. |
| 24 class RespondWithObserver final : public GarbageCollectedFinalized<RespondWithOb
server>, public ContextLifecycleObserver { | 21 class RespondWithObserver final : public GarbageCollectedFinalized<RespondWithOb
server>, public ContextLifecycleObserver { |
| 25 public: | 22 public: |
| 26 static RespondWithObserver* create(ExecutionContext*, int eventID, WebURLReq
uest::FetchRequestMode, WebURLRequest::FrameType); | 23 static RespondWithObserver* create(ExecutionContext*, int eventID, WebURLReq
uest::FetchRequestMode, WebURLRequest::FrameType); |
| 27 | 24 |
| 28 virtual void contextDestroyed() override; | 25 virtual void contextDestroyed() override; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 47 WebURLRequest::FetchRequestMode m_requestMode; | 44 WebURLRequest::FetchRequestMode m_requestMode; |
| 48 WebURLRequest::FrameType m_frameType; | 45 WebURLRequest::FrameType m_frameType; |
| 49 | 46 |
| 50 enum State { Initial, Pending, Done }; | 47 enum State { Initial, Pending, Done }; |
| 51 State m_state; | 48 State m_state; |
| 52 }; | 49 }; |
| 53 | 50 |
| 54 } // namespace blink | 51 } // namespace blink |
| 55 | 52 |
| 56 #endif // RespondWithObserver_h | 53 #endif // RespondWithObserver_h |
| OLD | NEW |