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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1460983002: Expose GetLastCommitedOrigin() on WebContents and use it in about:blank (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 27a226f75bb71d1735f87fcc92dbe6362e16c32b..f39619a78372be6b0e5648c3502ca25db7ac7aca 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -529,6 +529,7 @@ WebContentsImpl* WebContentsImpl::CreateWithOpener(
new_contents->is_subframe_ = true;
}
new_contents->Init(params);
+
return new_contents;
}
@@ -717,6 +718,10 @@ const GURL& WebContentsImpl::GetLastCommittedURL() const {
return entry ? entry->GetVirtualURL() : GURL::EmptyGURL();
}
+const url::Origin& WebContentsImpl::GetLastCommittedOrigin() const {
+ return frame_tree_.root()->current_replication_state().origin;
+}
+
WebContentsDelegate* WebContentsImpl::GetDelegate() {
return delegate_;
}
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698