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

Unified Diff: content/browser/frame_host/frame_tree_node.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 | « content/browser/frame_host/frame_tree.cc ('k') | content/browser/frame_host/frame_tree_node.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_node.h
diff --git a/content/browser/frame_host/frame_tree_node.h b/content/browser/frame_host/frame_tree_node.h
index 63030a610a62b7d40402270fad994e023422093c..36faa1a44e5d33cd9040f364faba61e97976149a 100644
--- a/content/browser/frame_host/frame_tree_node.h
+++ b/content/browser/frame_host/frame_tree_node.h
@@ -25,12 +25,13 @@ class CONTENT_EXPORT FrameTreeNode {
public:
static const int64 kInvalidFrameId;
- FrameTreeNode(int64 frame_id, const std::string& name,
+ FrameTreeNode(int64 frame_id,
+ const std::string& name,
scoped_ptr<RenderFrameHostImpl> render_frame_host);
~FrameTreeNode();
void AddChild(scoped_ptr<FrameTreeNode> child);
- void RemoveChild(int64 child_id);
+ void RemoveChild(FrameTreeNode* child);
// Transitional API allowing the RenderFrameHost of a FrameTreeNode
// representing the main frame to be provided by someone else. After
@@ -42,11 +43,16 @@ class CONTENT_EXPORT FrameTreeNode {
// no longer owned by the RenderViewHostImpl.
void ResetForMainFrame(RenderFrameHostImpl* new_render_frame_host);
+ int64 frame_tree_node_id() const {
+ return frame_tree_node_id_;
+ }
+
+ // DO NOT USE. Only used by FrameTree until we replace renderer-specific
+ // frame IDs with RenderFrameHost routing IDs.
void set_frame_id(int64 frame_id) {
DCHECK_EQ(frame_id_, kInvalidFrameId);
frame_id_ = frame_id;
}
-
int64 frame_id() const {
return frame_id_;
}
@@ -76,7 +82,17 @@ class CONTENT_EXPORT FrameTreeNode {
}
private:
- // The unique identifier for the frame in the page.
+ // The next available browser-global FrameTreeNode ID.
+ static int64 next_frame_tree_node_id_;
+
+ // A browser-global identifier for the frame in the page, which stays stable
+ // even if the frame does a cross-process navigation.
+ const int64 frame_tree_node_id_;
+
+ // The renderer-specific identifier for the frame in the page.
+ // TODO(creis): Remove this in favor of the RenderFrameHost's routing ID once
+ // we create FrameTreeNodes for all frames (even without a flag), since this
+ // value can change after cross-process navigations.
int64 frame_id_;
// The assigned name of the frame. This name can be empty, unlike the unique
« no previous file with comments | « content/browser/frame_host/frame_tree.cc ('k') | content/browser/frame_host/frame_tree_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698