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

Unified Diff: content/renderer/render_frame_proxy.cc

Issue 692973005: Pass origin information for remote frame creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/renderer/render_frame_proxy.cc
diff --git a/content/renderer/render_frame_proxy.cc b/content/renderer/render_frame_proxy.cc
index 6b8c760fe24ceec2acadee22b830d4cc26d0a375..045002d30307ecbe21e57dde61d3dff5a1bf24a4 100644
--- a/content/renderer/render_frame_proxy.cc
+++ b/content/renderer/render_frame_proxy.cc
@@ -9,6 +9,7 @@
#include "base/lazy_instance.h"
#include "content/child/webmessageportchannel_impl.h"
#include "content/common/frame_messages.h"
+#include "content/common/frame_replication_state.h"
#include "content/common/swapped_out_messages.h"
#include "content/common/view_messages.h"
#include "content/renderer/child_frame_compositing_helper.h"
@@ -54,7 +55,8 @@ RenderFrameProxy* RenderFrameProxy::CreateProxyToReplaceFrame(
RenderFrameProxy* RenderFrameProxy::CreateFrameProxy(
int routing_id,
int parent_routing_id,
- int render_view_routing_id) {
+ int render_view_routing_id,
+ const FrameReplicationState& replicated_state) {
scoped_ptr<RenderFrameProxy> proxy(
new RenderFrameProxy(routing_id, MSG_ROUTING_NONE));
RenderViewImpl* render_view = NULL;
@@ -74,6 +76,12 @@ RenderFrameProxy* RenderFrameProxy::CreateFrameProxy(
render_view = parent->render_view();
}
+ // initialize remote frame with the security origin that was passed to us
Charlie Reis 2014/11/13 18:00:58 nit: Capitalize nit: RemoteFrame
alexmos 2014/11/18 18:25:33 Done.
+ // from the process that is now rendering the frame.
+ web_frame->setReplicatedOrigin(
Charlie Reis 2014/11/13 18:00:58 We should probably have a more general method for
alexmos 2014/11/18 18:25:33 Done. Created a static method RenderFrameImpl::Se
+ blink::WebURL(GURL(replicated_state.origin.string())),
+ replicated_state.is_unique_origin);
+
proxy->Init(web_frame, render_view);
return proxy.release();

Powered by Google App Engine
This is Rietveld 408576698