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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.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 ForeignFetchRespondWithObserver_h 5 #ifndef ForeignFetchRespondWithObserver_h
6 #define ForeignFetchRespondWithObserver_h 6 #define ForeignFetchRespondWithObserver_h
7 7
8 #include "modules/serviceworkers/RespondWithObserver.h" 8 #include "modules/serviceworkers/RespondWithObserver.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 // This class observes the service worker's handling of a ForeignFetchEvent and 12 // This class observes the service worker's handling of a ForeignFetchEvent and
13 // notifies the client. 13 // notifies the client.
14 class MODULES_EXPORT ForeignFetchRespondWithObserver final : public RespondWithO bserver { 14 class MODULES_EXPORT ForeignFetchRespondWithObserver final : public RespondWithO bserver {
15 public: 15 public:
16 static ForeignFetchRespondWithObserver* create(ExecutionContext*, int eventI D, const KURL& requestURL, WebURLRequest::FetchRequestMode, WebURLRequest::Frame Type, WebURLRequest::RequestContext); 16 static ForeignFetchRespondWithObserver* create(ExecutionContext*, int eventI D, const KURL& requestURL, WebURLRequest::FetchRequestMode, WebURLRequest::Frame Type, WebURLRequest::RequestContext, PassRefPtr<SecurityOrigin>);
17 17
18 void responseWasFulfilled(const ScriptValue&) override; 18 void responseWasFulfilled(const ScriptValue&) override;
19 19
20 private: 20 private:
21 ForeignFetchRespondWithObserver(ExecutionContext*, int eventID, const KURL& requestURL, WebURLRequest::FetchRequestMode, WebURLRequest::FrameType, WebURLReq uest::RequestContext); 21 ForeignFetchRespondWithObserver(ExecutionContext*, int eventID, const KURL& requestURL, WebURLRequest::FetchRequestMode, WebURLRequest::FrameType, WebURLReq uest::RequestContext, PassRefPtr<SecurityOrigin>);
22
23 RefPtr<SecurityOrigin> m_requestOrigin;
22 }; 24 };
23 25
24 } // namespace blink 26 } // namespace blink
25 27
26 #endif // ForeignFetchRespondWithObserver_h 28 #endif // ForeignFetchRespondWithObserver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698