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

Unified Diff: third_party/WebKit/Source/web/WebDataSourceImpl.h

Issue 2416523002: Expose the initiating origin/URL of a navigation in the Blink public API (Closed)
Patch Set: Fix typo 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
Index: third_party/WebKit/Source/web/WebDataSourceImpl.h
diff --git a/third_party/WebKit/Source/web/WebDataSourceImpl.h b/third_party/WebKit/Source/web/WebDataSourceImpl.h
index bbc8efbdddf08445ea80e76d6ac7ea293c67bb31..0c2a84f61561a59978f4161ca46efaa1b249d43c 100644
--- a/third_party/WebKit/Source/web/WebDataSourceImpl.h
+++ b/third_party/WebKit/Source/web/WebDataSourceImpl.h
@@ -37,6 +37,7 @@
#include "platform/exported/WrappedResourceResponse.h"
#include "platform/heap/Handle.h"
#include "platform/weborigin/KURL.h"
+#include "public/platform/WebURL.h"
#include "public/web/WebDataSource.h"
#include "wtf/Vector.h"
#include <memory>
@@ -48,13 +49,15 @@ class WebDataSourceImpl final : public DocumentLoader, public WebDataSource {
static WebDataSourceImpl* create(LocalFrame*,
const ResourceRequest&,
const SubstituteData&,
- ClientRedirectPolicy);
+ ClientRedirectPolicy,
+ Document* requestorDocument);
static WebDataSourceImpl* fromDocumentLoader(DocumentLoader* loader) {
return static_cast<WebDataSourceImpl*>(loader);
}
// WebDataSource methods:
+ WebURL requestorURL() const override;
const WebURLRequest& originalRequest() const override;
const WebURLRequest& request() const override;
const WebURLResponse& response() const override;
@@ -82,11 +85,14 @@ class WebDataSourceImpl final : public DocumentLoader, public WebDataSource {
WebDataSourceImpl(LocalFrame*,
const ResourceRequest&,
const SubstituteData&,
- ClientRedirectPolicy);
+ ClientRedirectPolicy,
+ Document* requestorDocument);
~WebDataSourceImpl() override;
void detachFromFrame() override;
String debugName() const override { return "WebDataSourceImpl"; }
+ Member<Document> m_requestorDocument;
+
// Mutable because the const getters will magically sync these to the
// latest version from WebKit.
mutable WrappedResourceRequest m_originalRequestWrapper;

Powered by Google App Engine
This is Rietveld 408576698