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

Side by Side Diff: content/browser/frame_host/frame_tree_node.cc

Issue 2472253002: Fix navigation requests starting too early and not getting associated with the <webview>. (Closed)
Patch Set: nits Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/frame_tree_node.h" 5 #include "content/browser/frame_host/frame_tree_node.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 int frame_routing_id) { 154 int frame_routing_id) {
155 // Child frame must always be created in the same process as the parent. 155 // Child frame must always be created in the same process as the parent.
156 CHECK_EQ(process_id, render_manager_.current_host()->GetProcess()->GetID()); 156 CHECK_EQ(process_id, render_manager_.current_host()->GetProcess()->GetID());
157 157
158 // Initialize the RenderFrameHost for the new node. We always create child 158 // Initialize the RenderFrameHost for the new node. We always create child
159 // frames in the same SiteInstance as the current frame, and they can swap to 159 // frames in the same SiteInstance as the current frame, and they can swap to
160 // a different one if they navigate away. 160 // a different one if they navigate away.
161 child->render_manager()->Init( 161 child->render_manager()->Init(
162 render_manager_.current_host()->GetSiteInstance(), 162 render_manager_.current_host()->GetSiteInstance(),
163 render_manager_.current_host()->GetRoutingID(), frame_routing_id, 163 render_manager_.current_host()->GetRoutingID(), frame_routing_id,
164 MSG_ROUTING_NONE); 164 MSG_ROUTING_NONE, false);
165 165
166 // Other renderer processes in this BrowsingInstance may need to find out 166 // Other renderer processes in this BrowsingInstance may need to find out
167 // about the new frame. Create a proxy for the child frame in all 167 // about the new frame. Create a proxy for the child frame in all
168 // SiteInstances that have a proxy for the frame's parent, since all frames 168 // SiteInstances that have a proxy for the frame's parent, since all frames
169 // in a frame tree should have the same set of proxies. 169 // in a frame tree should have the same set of proxies.
170 // TODO(alexmos, nick): We ought to do this for non-oopif too, for openers. 170 // TODO(alexmos, nick): We ought to do this for non-oopif too, for openers.
171 if (SiteIsolationPolicy::AreCrossProcessFramesPossible()) 171 if (SiteIsolationPolicy::AreCrossProcessFramesPossible())
172 render_manager_.CreateProxiesForChildFrame(child.get()); 172 render_manager_.CreateProxiesForChildFrame(child.get());
173 173
174 children_.push_back(std::move(child)); 174 children_.push_back(std::move(child));
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 512 }
513 return parent_->child_at(i + relative_offset); 513 return parent_->child_at(i + relative_offset);
514 } 514 }
515 } 515 }
516 516
517 NOTREACHED() << "FrameTreeNode not found in its parent's children."; 517 NOTREACHED() << "FrameTreeNode not found in its parent's children.";
518 return nullptr; 518 return nullptr;
519 } 519 }
520 520
521 } // namespace content 521 } // namespace content
OLDNEW
« no previous file with comments | « components/guest_view/browser/guest_view_message_filter.cc ('k') | content/browser/frame_host/interstitial_page_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698