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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1635873003: Replicating WebFrame::uniqueName across renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dump-render-tree3
Patch Set: Removed unnecessary crbug comment. Created 4 years, 11 months 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_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 82dfe9a1b913cb8544839fb456ac9dd37919113f..352cff1e3ec56dd721087d7fc0950ba591ccd52f 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -848,6 +848,7 @@ void RenderFrameImpl::CreateFrame(
RenderFrameImpl::Create(parent_proxy->render_view(), routing_id);
web_frame = parent_web_frame->createLocalChild(
replicated_state.scope, WebString::fromUTF8(replicated_state.name),
+ WebString::fromUTF8(replicated_state.unique_name),
replicated_state.sandbox_flags, render_frame,
previous_sibling_web_frame, frame_owner_properties);
@@ -2619,14 +2620,21 @@ blink::WebFrame* RenderFrameImpl::createChildFrame(
blink::WebLocalFrame* parent,
blink::WebTreeScopeType scope,
const blink::WebString& name,
+ const blink::WebString& unique_name,
blink::WebSandboxFlags sandbox_flags,
- const blink::WebFrameOwnerProperties& frameOwnerProperties) {
+ const blink::WebFrameOwnerProperties& frame_owner_properties) {
// Synchronously notify the browser of a child frame creation to get the
// routing_id for the RenderFrame.
int child_routing_id = MSG_ROUTING_NONE;
- Send(new FrameHostMsg_CreateChildFrame(
- routing_id_, scope, base::UTF16ToUTF8(base::StringPiece16(name)),
- sandbox_flags, frameOwnerProperties, &child_routing_id));
+ FrameHostMsg_CreateChildFrame_Params params;
+ params.parent_routing_id = routing_id_;
+ params.scope = scope;
+ params.frame_name = base::UTF16ToUTF8(base::StringPiece16(name));
+ params.frame_unique_name =
+ base::UTF16ToUTF8(base::StringPiece16(unique_name));
+ params.sandbox_flags = sandbox_flags;
+ params.frame_owner_properties = frame_owner_properties;
+ Send(new FrameHostMsg_CreateChildFrame(params, &child_routing_id));
// Allocation of routing id failed, so we can't create a child frame. This can
// happen if this RenderFrameImpl's IPCs are being filtered when in swapped
@@ -2740,7 +2748,8 @@ void RenderFrameImpl::willClose(blink::WebFrame* frame) {
}
void RenderFrameImpl::didChangeName(blink::WebLocalFrame* frame,
- const blink::WebString& name) {
+ const blink::WebString& name,
+ const blink::WebString& unique_name) {
DCHECK(!frame_ || frame_ == frame);
// TODO(alexmos): According to https://crbug.com/169110, sending window.name
@@ -2754,7 +2763,8 @@ void RenderFrameImpl::didChangeName(blink::WebLocalFrame* frame,
if (SiteIsolationPolicy::AreCrossProcessFramesPossible() ||
render_view_->renderer_preferences_.report_frame_name_changes) {
Send(new FrameHostMsg_DidChangeName(
- routing_id_, base::UTF16ToUTF8(base::StringPiece16(name))));
+ routing_id_, base::UTF16ToUTF8(base::StringPiece16(name)),
+ base::UTF16ToUTF8(base::StringPiece16(unique_name))));
}
}

Powered by Google App Engine
This is Rietveld 408576698