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

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

Issue 1969403004: Expose and check origin of request in response for foreign fetch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@set-request-and-credentials-mode
Patch Set: update layouttests Created 4 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 ForeignFetchEvent_h 5 #ifndef ForeignFetchEvent_h
6 #define ForeignFetchEvent_h 6 #define ForeignFetchEvent_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "modules/EventModules.h" 9 #include "modules/EventModules.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
(...skipping 12 matching lines...) Expand all
23 // context. ForeignFetchRespondWithObserver can be used to notify the client 23 // context. ForeignFetchRespondWithObserver can be used to notify the client
24 // about the service worker's response. 24 // about the service worker's response.
25 class MODULES_EXPORT ForeignFetchEvent final : public ExtendableEvent { 25 class MODULES_EXPORT ForeignFetchEvent final : public ExtendableEvent {
26 DEFINE_WRAPPERTYPEINFO(); 26 DEFINE_WRAPPERTYPEINFO();
27 public: 27 public:
28 static ForeignFetchEvent* create(); 28 static ForeignFetchEvent* create();
29 static ForeignFetchEvent* create(const AtomicString& type, const ForeignFetc hEventInit&); 29 static ForeignFetchEvent* create(const AtomicString& type, const ForeignFetc hEventInit&);
30 static ForeignFetchEvent* create(const AtomicString& type, const ForeignFetc hEventInit&, ForeignFetchRespondWithObserver*); 30 static ForeignFetchEvent* create(const AtomicString& type, const ForeignFetc hEventInit&, ForeignFetchRespondWithObserver*);
31 31
32 Request* request() const; 32 Request* request() const;
33 String origin() const;
33 34
34 void respondWith(ScriptState*, ScriptPromise, ExceptionState&); 35 void respondWith(ScriptState*, ScriptPromise, ExceptionState&);
35 36
36 const AtomicString& interfaceName() const override; 37 const AtomicString& interfaceName() const override;
37 38
38 DECLARE_VIRTUAL_TRACE(); 39 DECLARE_VIRTUAL_TRACE();
39 40
40 protected: 41 protected:
41 ForeignFetchEvent(); 42 ForeignFetchEvent();
42 ForeignFetchEvent(const AtomicString& type, const ForeignFetchEventInit&, Fo reignFetchRespondWithObserver*); 43 ForeignFetchEvent(const AtomicString& type, const ForeignFetchEventInit&, Fo reignFetchRespondWithObserver*);
43 44
44 private: 45 private:
45 Member<ForeignFetchRespondWithObserver> m_observer; 46 Member<ForeignFetchRespondWithObserver> m_observer;
46 Member<Request> m_request; 47 Member<Request> m_request;
48 String m_origin;
47 }; 49 };
48 50
49 } // namespace blink 51 } // namespace blink
50 52
51 #endif // ForeignFetchEvent_h 53 #endif // ForeignFetchEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698