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

Side by Side Diff: content/browser/frame_host/frame_tree.h

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 unified diff | Download patch | Annotate | Revision Log
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 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // after a swap. These two functions are used to set the root node's frame 67 // after a swap. These two functions are used to set the root node's frame
68 // id. 68 // id.
69 // 69 //
70 // TODO(ajwong): Remove these once RenderFrameHost's routing id replaces 70 // TODO(ajwong): Remove these once RenderFrameHost's routing id replaces
71 // frame_id. 71 // frame_id.
72 bool IsFirstNavigationAfterSwap() const; 72 bool IsFirstNavigationAfterSwap() const;
73 void OnFirstNavigationAfterSwap(int main_frame_id); 73 void OnFirstNavigationAfterSwap(int main_frame_id);
74 74
75 // Frame tree manipulation routines. 75 // Frame tree manipulation routines.
76 // TODO(creis): These should take in RenderFrameHost routing IDs. 76 // TODO(creis): These should take in RenderFrameHost routing IDs.
77 void AddFrame(int render_frame_host_id, 77 RenderFrameHostImpl* AddFrame(int render_frame_host_id,
78 int64 parent_frame_tree_node_id, 78 int64 parent_frame_tree_node_id,
79 int64 frame_id, 79 int64 frame_id,
80 const std::string& frame_name); 80 const std::string& frame_name);
81 void RemoveFrame(int64 parent_frame_id, int64 frame_id); 81 void RemoveFrame(int64 parent_frame_id, int64 frame_id);
82 void SetFrameUrl(int64 frame_id, const GURL& url); 82 void SetFrameUrl(int64 frame_id, const GURL& url);
83 83
84 // Resets the FrameTree and changes RenderFrameHost for the main frame. 84 // Resets the FrameTree and changes RenderFrameHost for the main frame.
85 // This destroys most of the frame tree but retains the root node so that 85 // This destroys most of the frame tree but retains the root node so that
86 // navigation state may be kept on it between process swaps. Used to 86 // navigation state may be kept on it between process swaps. Used to
87 // support bookkeeping for top-level navigations. 87 // support bookkeeping for top-level navigations.
88 // 88 //
89 // If |main_frame| is NULL, reset tree to initially constructed state. 89 // If |main_frame| is NULL, reset tree to initially constructed state.
90 // 90 //
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 scoped_ptr<FrameTreeNode> root_; 128 scoped_ptr<FrameTreeNode> root_;
129 129
130 base::Callback<void(RenderViewHostImpl*, int64)> on_frame_removed_; 130 base::Callback<void(RenderViewHostImpl*, int64)> on_frame_removed_;
131 131
132 DISALLOW_COPY_AND_ASSIGN(FrameTree); 132 DISALLOW_COPY_AND_ASSIGN(FrameTree);
133 }; 133 };
134 134
135 } // namespace content 135 } // namespace content
136 136
137 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 137 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698