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

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

Issue 974723002: OOPIF: Replicate dynamic window.name updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 272aeb201995ae28ed0858dccb99fcb673914a50..d34ecc8164817f156e8db71ef9677430c8048b0c 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -369,6 +369,7 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument,
OnDidAccessInitialDocument)
IPC_MESSAGE_HANDLER(FrameHostMsg_DidDisownOpener, OnDidDisownOpener)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName)
IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId)
IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle)
IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding)
@@ -1188,6 +1189,14 @@ void RenderFrameHostImpl::OnDidDisownOpener() {
delegate_->DidDisownOpener(this);
}
+void RenderFrameHostImpl::OnDidChangeName(const std::string& name) {
+ // Update the frame's name in the browser process
nasko 2015/03/05 18:09:27 nit: Comments that explain what the code does when
alexmos 2015/03/09 18:47:58 Done.
+ frame_tree_node()->set_frame_name(name);
+
+ // Notify this frame's proxies about the updated name.
+ frame_tree_node()->render_manager()->OnDidUpdateName(name);
nasko 2015/03/05 18:09:27 Shouldn't we put this code inside the FTN's method
alexmos 2015/03/09 18:47:58 Great point - done. Renamed FrameTreeNode::set_fr
+}
+
void RenderFrameHostImpl::OnDidAssignPageId(int32 page_id) {
// Update the RVH's current page ID so that future IPCs from the renderer
// correspond to the new page.

Powered by Google App Engine
This is Rietveld 408576698