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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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 unified diff | Download patch
OLDNEW
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 "core/events/EventTarget.h" 9 #include "core/events/EventTarget.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
(...skipping 22 matching lines...) Expand all
33 33
34 static RespondWithObserver* create(ExecutionContext*, 34 static RespondWithObserver* create(ExecutionContext*,
35 int fetchEventID, 35 int fetchEventID,
36 const KURL& requestURL, 36 const KURL& requestURL,
37 WebURLRequest::FetchRequestMode, 37 WebURLRequest::FetchRequestMode,
38 WebURLRequest::FetchRedirectMode, 38 WebURLRequest::FetchRedirectMode,
39 WebURLRequest::FrameType, 39 WebURLRequest::FrameType,
40 WebURLRequest::RequestContext, 40 WebURLRequest::RequestContext,
41 WaitUntilObserver*); 41 WaitUntilObserver*);
42 42
43 void contextDestroyed() override; 43 void contextDestroyed(ExecutionContext*) override;
44 44
45 void willDispatchEvent(); 45 void willDispatchEvent();
46 void didDispatchEvent(DispatchEventResult dispatchResult); 46 void didDispatchEvent(DispatchEventResult dispatchResult);
47 47
48 // Observes the promise and delays calling didHandleFetchEvent() until the 48 // Observes the promise and delays calling didHandleFetchEvent() until the
49 // given promise is resolved or rejected. 49 // given promise is resolved or rejected.
50 void respondWith(ScriptState*, ScriptPromise, ExceptionState&); 50 void respondWith(ScriptState*, ScriptPromise, ExceptionState&);
51 51
52 void responseWasRejected(WebServiceWorkerResponseError); 52 void responseWasRejected(WebServiceWorkerResponseError);
53 virtual void responseWasFulfilled(const ScriptValue&); 53 virtual void responseWasFulfilled(const ScriptValue&);
(...skipping 29 matching lines...) Expand all
83 // passed to RespondWith is resolved. The lifecycle of the ExtendableEvent 83 // passed to RespondWith is resolved. The lifecycle of the ExtendableEvent
84 // is controlled by WaitUntilObserver, so not only 84 // is controlled by WaitUntilObserver, so not only
85 // WaitUntilObserver::ThenFunction but RespondWith needs to have a strong 85 // WaitUntilObserver::ThenFunction but RespondWith needs to have a strong
86 // reference to the WaitUntilObserver. 86 // reference to the WaitUntilObserver.
87 Member<WaitUntilObserver> m_observer; 87 Member<WaitUntilObserver> m_observer;
88 }; 88 };
89 89
90 } // namespace blink 90 } // namespace blink
91 91
92 #endif // RespondWithObserver_h 92 #endif // RespondWithObserver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698