Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(674)

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h

Issue 1845463002: Start implementing ForeignFetchEvent for foreign fetch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h
diff --git a/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h b/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h
index 7fc8a51838a0ab240297befbcc785be248f4056c..b87cd8b0deabaf7b313fc0768e532ea82392b94c 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h
@@ -22,9 +22,11 @@ class ScriptValue;
// This class observes the service worker's handling of a FetchEvent and
// notifies the client.
-class MODULES_EXPORT RespondWithObserver final : public GarbageCollectedFinalized<RespondWithObserver>, public ContextLifecycleObserver {
+class MODULES_EXPORT RespondWithObserver : public GarbageCollectedFinalized<RespondWithObserver>, public ContextLifecycleObserver {
USING_GARBAGE_COLLECTED_MIXIN(RespondWithObserver);
public:
+ virtual ~RespondWithObserver();
+
static RespondWithObserver* create(ExecutionContext*, int eventID, const KURL& requestURL, WebURLRequest::FetchRequestMode, WebURLRequest::FrameType, WebURLRequest::RequestContext);
void contextDestroyed() override;
@@ -36,15 +38,16 @@ public:
void respondWith(ScriptState*, ScriptPromise, ExceptionState&);
void responseWasRejected(WebServiceWorkerResponseError);
- void responseWasFulfilled(const ScriptValue&);
+ virtual void responseWasFulfilled(const ScriptValue&);
DECLARE_VIRTUAL_TRACE();
+protected:
+ RespondWithObserver(ExecutionContext*, int eventID, const KURL& requestURL, WebURLRequest::FetchRequestMode, WebURLRequest::FrameType, WebURLRequest::RequestContext);
+
private:
class ThenFunction;
- RespondWithObserver(ExecutionContext*, int eventID, const KURL& requestURL, WebURLRequest::FetchRequestMode, WebURLRequest::FrameType, WebURLRequest::RequestContext);
-
int m_eventID;
KURL m_requestURL;
WebURLRequest::FetchRequestMode m_requestMode;

Powered by Google App Engine
This is Rietveld 408576698