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

Side by Side Diff: Source/modules/serviceworkers/FetchEvent.h

Issue 182763002: Add [WillBeGarbageCollected] to Event.idl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 FetchEvent_h 5 #ifndef FetchEvent_h
6 #define FetchEvent_h 6 #define FetchEvent_h
7 7
8 #include "core/events/Event.h" 8 #include "core/events/Event.h"
9 #include "modules/serviceworkers/RespondWithObserver.h" 9 #include "modules/serviceworkers/RespondWithObserver.h"
10 10
11 namespace WebCore { 11 namespace WebCore {
12 12
13 class ExecutionContext; 13 class ExecutionContext;
14 class RespondWithObserver; 14 class RespondWithObserver;
15 15
16 // A fetch event is dispatched by the client to a service worker's script 16 // A fetch event is dispatched by the client to a service worker's script
17 // context. RespondWithObserver can be used to notify the client about the 17 // context. RespondWithObserver can be used to notify the client about the
18 // service worker's response. 18 // service worker's response.
19 class FetchEvent FINAL : public Event { 19 class FetchEvent FINAL : public Event {
20 public: 20 public:
21 static PassRefPtr<FetchEvent> create(); 21 static PassRefPtrWillBeRawPtr<FetchEvent> create();
22 static PassRefPtr<FetchEvent> create(PassRefPtr<RespondWithObserver>); 22 static PassRefPtrWillBeRawPtr<FetchEvent> create(PassRefPtr<RespondWithObser ver>);
23 virtual ~FetchEvent() { } 23 virtual ~FetchEvent() { }
24 24
25 void respondWith(const ScriptValue&); 25 void respondWith(const ScriptValue&);
26 26
27 virtual const AtomicString& interfaceName() const OVERRIDE; 27 virtual const AtomicString& interfaceName() const OVERRIDE;
28 28
29 virtual void trace(Visitor*) OVERRIDE;
30
29 protected: 31 protected:
30 FetchEvent(); 32 FetchEvent();
31 explicit FetchEvent(PassRefPtr<RespondWithObserver>); 33 explicit FetchEvent(PassRefPtr<RespondWithObserver>);
32 34
33 private: 35 private:
34 RefPtr<RespondWithObserver> m_observer; 36 RefPtr<RespondWithObserver> m_observer;
35 }; 37 };
36 38
37 } // namespace WebCore 39 } // namespace WebCore
38 40
39 #endif // FetchEvent_h 41 #endif // FetchEvent_h
OLDNEW
« no previous file with comments | « Source/modules/mediastream/RTCIceCandidateEvent.cpp ('k') | Source/modules/serviceworkers/FetchEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698