Chromium Code Reviews| Index: third_party/WebKit/Source/core/loader/DocumentLoader.h |
| diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.h b/third_party/WebKit/Source/core/loader/DocumentLoader.h |
| index 21af660142a3493b92cd39e5a1f50910b72cedba..7a7f40396ebf5b05bc58de71eddc298d0d5ae69e 100644 |
| --- a/third_party/WebKit/Source/core/loader/DocumentLoader.h |
| +++ b/third_party/WebKit/Source/core/loader/DocumentLoader.h |
| @@ -72,8 +72,10 @@ class CORE_EXPORT DocumentLoader |
| static DocumentLoader* create(LocalFrame* frame, |
| const ResourceRequest& request, |
| const SubstituteData& data, |
| - ClientRedirectPolicy clientRedirectPolicy) { |
| - return new DocumentLoader(frame, request, data, clientRedirectPolicy); |
| + ClientRedirectPolicy clientRedirectPolicy, |
| + Document* requestorDocument = nullptr) { |
|
dcheng
2016/11/23 08:32:59
The default arg made it easier to add this argumen
Mike West
2016/11/23 11:11:20
Looks like we only call it in ~5 places, mostly te
dcheng
2016/11/23 14:41:44
Done.
|
| + return new DocumentLoader(frame, request, data, clientRedirectPolicy, |
| + requestorDocument); |
| } |
| ~DocumentLoader() override; |
| @@ -188,7 +190,10 @@ class CORE_EXPORT DocumentLoader |
| DocumentLoader(LocalFrame*, |
| const ResourceRequest&, |
| const SubstituteData&, |
| - ClientRedirectPolicy); |
| + ClientRedirectPolicy, |
| + Document* requestorDocument); |
| + |
| + Document* requestorDocument() const { return m_requestorDocument; } |
| void didRedirect(const KURL& oldURL, const KURL& newURL); |
| @@ -241,6 +246,8 @@ class CORE_EXPORT DocumentLoader |
| Member<DocumentWriter> m_writer; |
| + Member<Document> m_requestorDocument; |
| + |
| // A reference to actual request used to create the data source. |
| // The only part of this request that should change is the url, and |
| // that only in the case of a same-document navigation. |