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

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

Issue 107893003: Make the renderer-side prerendering code use RenderFrames instead of RenderViews. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: creis review comments Created 7 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
Index: content/browser/frame_host/frame_tree.cc
===================================================================
--- content/browser/frame_host/frame_tree.cc (revision 239602)
+++ content/browser/frame_host/frame_tree.cc (working copy)
@@ -95,19 +95,22 @@
root_->set_frame_id(main_frame_id);
}
-void FrameTree::AddFrame(int render_frame_host_id,
- int64 parent_frame_id,
- int64 frame_id,
- const std::string& frame_name) {
+RenderFrameHostImpl* FrameTree::AddFrame(int render_frame_host_id,
+ int64 parent_frame_id,
+ int64 frame_id,
+ const std::string& frame_name) {
FrameTreeNode* parent = FindByFrameID(parent_frame_id);
// TODO(ajwong): Should the renderer be killed here? Would there be a race on
// shutdown that might make this case possible?
if (!parent)
- return;
+ return NULL;
- parent->AddChild(CreateNode(frame_id, frame_name, render_frame_host_id,
- parent->navigator(),
- parent->render_frame_host()->GetProcess()));
+ scoped_ptr<FrameTreeNode> node(CreateNode(
+ frame_id, frame_name, render_frame_host_id, parent->navigator(),
+ parent->render_frame_host()->GetProcess()));
+ RenderFrameHostImpl* render_frame = node->render_frame_host();
+ parent->AddChild(node.Pass());
+ return render_frame;
}
void FrameTree::RemoveFrame(int64 parent_frame_id, int64 frame_id) {

Powered by Google App Engine
This is Rietveld 408576698