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

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

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_node.h ('k') | content/browser/renderer_host/render_view_host_impl.h » ('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.cc
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index 9bed9f699ecc57edde996cde2dcb18f3c7b96ed2..fc45dc1f2f1978bdc47785df02192351ca85afca 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -12,10 +12,13 @@
namespace content {
const int64 FrameTreeNode::kInvalidFrameId = -1;
+int64 FrameTreeNode::next_frame_tree_node_id_ = 1;
-FrameTreeNode::FrameTreeNode(int64 frame_id, const std::string& name,
+FrameTreeNode::FrameTreeNode(int64 frame_id,
+ const std::string& name,
scoped_ptr<RenderFrameHostImpl> render_frame_host)
- : frame_id_(frame_id),
+ : frame_tree_node_id_(next_frame_tree_node_id_++),
+ frame_id_(frame_id),
frame_name_(name),
owns_render_frame_host_(true),
render_frame_host_(render_frame_host.release()) {
@@ -30,11 +33,11 @@ void FrameTreeNode::AddChild(scoped_ptr<FrameTreeNode> child) {
children_.push_back(child.release());
}
-void FrameTreeNode::RemoveChild(int64 child_id) {
+void FrameTreeNode::RemoveChild(FrameTreeNode* child) {
std::vector<FrameTreeNode*>::iterator iter;
for (iter = children_.begin(); iter != children_.end(); ++iter) {
- if ((*iter)->frame_id() == child_id)
+ if ((*iter) == child)
break;
}
« no previous file with comments | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698