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

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

Issue 1149163004: Revert "Add Client Attribute to FetchEvent- Blink Side." (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix merge Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/modules/serviceworkers/FetchEvent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "modules/EventModules.h" 8 #include "modules/EventModules.h"
9 #include "modules/ModulesExport.h" 9 #include "modules/ModulesExport.h"
10 #include "modules/fetch/Request.h" 10 #include "modules/fetch/Request.h"
11 #include "modules/serviceworkers/ExtendableEvent.h" 11 #include "modules/serviceworkers/ExtendableEvent.h"
12 #include "modules/serviceworkers/FetchEventInit.h" 12 #include "modules/serviceworkers/FetchEventInit.h"
13 #include "modules/serviceworkers/RespondWithObserver.h" 13 #include "modules/serviceworkers/RespondWithObserver.h"
14 #include "modules/serviceworkers/ServiceWorkerClient.h"
15 #include "platform/heap/Handle.h" 14 #include "platform/heap/Handle.h"
16 15
17 namespace blink { 16 namespace blink {
18 17
19 class ExceptionState; 18 class ExceptionState;
20 class Request; 19 class Request;
21 class RespondWithObserver; 20 class RespondWithObserver;
22 21
23 // A fetch event is dispatched by the client to a service worker's script 22 // A fetch event is dispatched by the client to a service worker's script
24 // context. RespondWithObserver can be used to notify the client about the 23 // context. RespondWithObserver can be used to notify the client about the
25 // service worker's response. 24 // service worker's response.
26 class MODULES_EXPORT FetchEvent final : public ExtendableEvent { 25 class MODULES_EXPORT FetchEvent final : public ExtendableEvent {
27 DEFINE_WRAPPERTYPEINFO(); 26 DEFINE_WRAPPERTYPEINFO();
28 public: 27 public:
29 static PassRefPtrWillBeRawPtr<FetchEvent> create(); 28 static PassRefPtrWillBeRawPtr<FetchEvent> create();
30 static PassRefPtrWillBeRawPtr<FetchEvent> create(const AtomicString& type, F etchEventInit&); 29 static PassRefPtrWillBeRawPtr<FetchEvent> create(const AtomicString& type, F etchEventInit&);
31 static PassRefPtrWillBeRawPtr<FetchEvent> create(const AtomicString& type, F etchEventInit&, RespondWithObserver*); 30 static PassRefPtrWillBeRawPtr<FetchEvent> create(const AtomicString& type, F etchEventInit&, RespondWithObserver*);
32 31
33 Request* request() const; 32 Request* request() const;
34 ServiceWorkerClient* client() const;
35 bool isReload() const; 33 bool isReload() const;
36 34
37 void respondWith(ScriptState*, const ScriptValue&, ExceptionState&); 35 void respondWith(ScriptState*, const ScriptValue&, ExceptionState&);
38 36
39 virtual const AtomicString& interfaceName() const override; 37 virtual const AtomicString& interfaceName() const override;
40 38
41 DECLARE_VIRTUAL_TRACE(); 39 DECLARE_VIRTUAL_TRACE();
42 40
43 protected: 41 protected:
44 FetchEvent(); 42 FetchEvent();
45 FetchEvent(const AtomicString& type, const FetchEventInit&, RespondWithObser ver*); 43 FetchEvent(const AtomicString& type, const FetchEventInit&, RespondWithObser ver*);
46 44
47 private: 45 private:
48 PersistentWillBeMember<RespondWithObserver> m_observer; 46 PersistentWillBeMember<RespondWithObserver> m_observer;
49 PersistentWillBeMember<Request> m_request; 47 PersistentWillBeMember<Request> m_request;
50 PersistentWillBeMember<ServiceWorkerClient> m_client;
51 bool m_isReload; 48 bool m_isReload;
52 }; 49 };
53 50
54 } // namespace blink 51 } // namespace blink
55 52
56 #endif // FetchEvent_h 53 #endif // FetchEvent_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/serviceworkers/FetchEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698