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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1475433002: Expose RenderFrameHost::GetLastCommittedOrigin(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Charlie's fixes. 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
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/public/browser/render_frame_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 4a016945ec23b1bf395fbb8ff3b46823ca0ce1a9..ec35e80105fb488708add0f3f3f052bf482ddc8e 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -313,6 +313,12 @@ GURL RenderFrameHostImpl::GetLastCommittedURL() {
return frame_tree_node_->current_url();
}
+url::Origin RenderFrameHostImpl::GetLastCommittedOrigin() {
+ // Origin is stored per-FTN, so it's incorrect to call for a non-current RFH.
+ CHECK(this == frame_tree_node_->current_frame_host());
+ return frame_tree_node_->current_origin();
+}
+
gfx::NativeView RenderFrameHostImpl::GetNativeView() {
RenderWidgetHostView* view = render_view_host_->GetWidget()->GetView();
if (!view)
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/public/browser/render_frame_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698