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

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: Fix test failures for content:// URLs on Android Created 6 years 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/renderer/render_frame_proxy.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_proxy.cc
diff --git a/content/renderer/render_frame_proxy.cc b/content/renderer/render_frame_proxy.cc
index 1629db50260a4c402d2fb3489549f58237d0a021..ac4863f63e61dd14995a70dd875a9aeb0ad5c7e5 100644
--- a/content/renderer/render_frame_proxy.cc
+++ b/content/renderer/render_frame_proxy.cc
@@ -9,12 +9,14 @@
#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"
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/render_view_impl.h"
+#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
#include "third_party/WebKit/public/web/WebView.h"
@@ -54,7 +56,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;
@@ -76,6 +79,10 @@ RenderFrameProxy* RenderFrameProxy::CreateFrameProxy(
proxy->Init(web_frame, render_view);
+ // Initialize proxy's WebRemoteFrame with the security origin and other
+ // replicated information.
+ proxy->SetReplicatedState(replicated_state);
+
return proxy.release();
}
@@ -141,6 +148,12 @@ void RenderFrameProxy::DidCommitCompositorFrame() {
compositing_helper_->DidCommitCompositorFrame();
}
+void RenderFrameProxy::SetReplicatedState(const FrameReplicationState& state) {
+ DCHECK(web_frame_);
+ web_frame_->setReplicatedOrigin(blink::WebSecurityOrigin::createFromString(
+ blink::WebString::fromUTF8(state.origin.string())));
+}
+
bool RenderFrameProxy::OnMessageReceived(const IPC::Message& msg) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(RenderFrameProxy, msg)
« no previous file with comments | « content/renderer/render_frame_proxy.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698