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

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

Issue 63523004: Give FrameTreeNodes a browser-global ID for use in navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update parameter name Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/frame_tree.h
diff --git a/content/browser/frame_host/frame_tree.h b/content/browser/frame_host/frame_tree.h
index f9bf80970a618366509b7bb7e70efffa8da544a1..6824e7e10153827d3d10526fba194d8f202ad66c 100644
--- a/content/browser/frame_host/frame_tree.h
+++ b/content/browser/frame_host/frame_tree.h
@@ -38,8 +38,8 @@ class CONTENT_EXPORT FrameTree {
FrameTree();
~FrameTree();
- // Returns the FrameTreeNode with the given |frame_id|.
- FrameTreeNode* FindByID(int64 frame_id);
+ // Returns the FrameTreeNode with the given |frame_tree_node_id|.
+ FrameTreeNode* FindByID(int64 frame_tree_node_id);
// Executes |on_node| on each node in the frame tree. If |on_node| returns
// false, terminates the iteration immediately. Returning false is useful
@@ -58,8 +58,11 @@ class CONTENT_EXPORT FrameTree {
void OnFirstNavigationAfterSwap(int main_frame_id);
// Frame tree manipulation routines.
- void AddFrame(int render_frame_host_id, int64 parent_frame_id,
- int64 frame_id, const std::string& frame_name);
+ // TODO(creis): These should take in RenderFrameHost routing IDs.
+ void AddFrame(int render_frame_host_id,
+ int64 parent_frame_tree_node_id,
+ int64 frame_id,
+ const std::string& frame_name);
void RemoveFrame(int64 parent_frame_id, int64 frame_id);
void SetFrameUrl(int64 frame_id, const GURL& url);
@@ -79,13 +82,21 @@ class CONTENT_EXPORT FrameTree {
// Convenience accessor for the main frame's RenderFrameHostImpl.
RenderFrameHostImpl* GetMainFrame() const;
- // Allows a client to listen for frame removal.
+ // Allows a client to listen for frame removal. The listener should expect
+ // to receive the RenderViewHostImpl containing the frame and the renderer-
+ // specific frame ID of the removed frame.
+ // TODO(creis): These parameters will later change to be the RenderFrameHost.
void SetFrameRemoveListener(
const base::Callback<void(RenderViewHostImpl*, int64)>& on_frame_removed);
FrameTreeNode* GetRootForTesting() { return root_.get(); }
private:
+ // Returns the FrameTreeNode with the given renderer-specific |frame_id|.
+ // For internal use only.
+ // TODO(creis): Replace this with a version that takes in a routing ID.
+ FrameTreeNode* FindByFrameID(int64 frame_id);
+
scoped_ptr<FrameTreeNode> CreateNode(int64 frame_id,
const std::string& frame_name,
int render_frame_host_id,
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698