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

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: Rebasing... Created 4 years, 10 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
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_impl_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 71b9e1262ec23eb9a62167bbeec4bfa715532d95..a18b820aaabc24c8ade41703c95d1c601811e346 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -863,6 +863,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
@@ -2739,7 +2747,8 @@ void RenderFrameImpl::willClose(blink::WebFrame* frame) {
FrameWillClose(frame));
}
-void RenderFrameImpl::didChangeName(const blink::WebString& name) {
+void RenderFrameImpl::didChangeName(const blink::WebString& name,
+ const blink::WebString& unique_name) {
// TODO(alexmos): According to https://crbug.com/169110, sending window.name
// updates may have performance implications for benchmarks like SunSpider.
// For now, send these updates only for --site-per-process, which needs to
@@ -2751,7 +2760,8 @@ void RenderFrameImpl::didChangeName(const blink::WebString& name) {
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))));
}
}
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698