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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentLoader.h

Issue 2416523002: Expose the initiating origin/URL of a navigation in the Blink public API (Closed)
Patch Set: rebase Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b908aae09d7bb2340af7e55d4379c069edc9daf9 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) {
+ 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.
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698