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

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

Issue 1093923003: Change FrameTreeNode id from int64 to int. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change FrameTreeNode id from int64 to int Created 5 years, 7 months 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
« no previous file with comments | « content/browser/frame_host/frame_tree.h ('k') | content/browser/frame_host/frame_tree_node.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/browser/frame_host/frame_tree.h" 5 #include "content/browser/frame_host/frame_tree.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/containers/hash_tables.h" 11 #include "base/containers/hash_tables.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "content/browser/frame_host/frame_tree_node.h" 13 #include "content/browser/frame_host/frame_tree_node.h"
14 #include "content/browser/frame_host/navigator.h" 14 #include "content/browser/frame_host/navigator.h"
15 #include "content/browser/frame_host/render_frame_host_factory.h" 15 #include "content/browser/frame_host/render_frame_host_factory.h"
16 #include "content/browser/frame_host/render_frame_host_impl.h" 16 #include "content/browser/frame_host/render_frame_host_impl.h"
17 #include "content/browser/frame_host/render_frame_proxy_host.h" 17 #include "content/browser/frame_host/render_frame_proxy_host.h"
18 #include "content/browser/renderer_host/render_view_host_factory.h" 18 #include "content/browser/renderer_host/render_view_host_factory.h"
19 #include "content/browser/renderer_host/render_view_host_impl.h" 19 #include "content/browser/renderer_host/render_view_host_impl.h"
20 20
21 namespace content { 21 namespace content {
22 22
23 namespace { 23 namespace {
24 24
25 // Used with FrameTree::ForEach() to search for the FrameTreeNode 25 // Used with FrameTree::ForEach() to search for the FrameTreeNode
26 // corresponding to |frame_tree_node_id| within a specific FrameTree. 26 // corresponding to |frame_tree_node_id| within a specific FrameTree.
27 bool FrameTreeNodeForId(int64 frame_tree_node_id, 27 bool FrameTreeNodeForId(int frame_tree_node_id,
28 FrameTreeNode** out_node, 28 FrameTreeNode** out_node,
29 FrameTreeNode* node) { 29 FrameTreeNode* node) {
30 if (node->frame_tree_node_id() == frame_tree_node_id) { 30 if (node->frame_tree_node_id() == frame_tree_node_id) {
31 *out_node = node; 31 *out_node = node;
32 // Terminate iteration once the node has been found. 32 // Terminate iteration once the node has been found.
33 return false; 33 return false;
34 } 34 }
35 return true; 35 return true;
36 } 36 }
37 37
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 render_widget_delegate, 109 render_widget_delegate,
110 manager_delegate, 110 manager_delegate,
111 std::string())), 111 std::string())),
112 focused_frame_tree_node_id_(-1), 112 focused_frame_tree_node_id_(-1),
113 load_progress_(0.0) { 113 load_progress_(0.0) {
114 } 114 }
115 115
116 FrameTree::~FrameTree() { 116 FrameTree::~FrameTree() {
117 } 117 }
118 118
119 FrameTreeNode* FrameTree::FindByID(int64 frame_tree_node_id) { 119 FrameTreeNode* FrameTree::FindByID(int frame_tree_node_id) {
120 FrameTreeNode* node = nullptr; 120 FrameTreeNode* node = nullptr;
121 ForEach(base::Bind(&FrameTreeNodeForId, frame_tree_node_id, &node)); 121 ForEach(base::Bind(&FrameTreeNodeForId, frame_tree_node_id, &node));
122 return node; 122 return node;
123 } 123 }
124 124
125 FrameTreeNode* FrameTree::FindByRoutingID(int process_id, int routing_id) { 125 FrameTreeNode* FrameTree::FindByRoutingID(int process_id, int routing_id) {
126 RenderFrameHostImpl* render_frame_host = 126 RenderFrameHostImpl* render_frame_host =
127 RenderFrameHostImpl::FromID(process_id, routing_id); 127 RenderFrameHostImpl::FromID(process_id, routing_id);
128 if (render_frame_host) { 128 if (render_frame_host) {
129 FrameTreeNode* result = render_frame_host->frame_tree_node(); 129 FrameTreeNode* result = render_frame_host->frame_tree_node();
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 load_progress_ = 0.0; 388 load_progress_ = 0.0;
389 } 389 }
390 390
391 bool FrameTree::IsLoading() { 391 bool FrameTree::IsLoading() {
392 bool is_loading = false; 392 bool is_loading = false;
393 ForEach(base::Bind(&IsNodeLoading, &is_loading)); 393 ForEach(base::Bind(&IsNodeLoading, &is_loading));
394 return is_loading; 394 return is_loading;
395 } 395 }
396 396
397 } // namespace content 397 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree.h ('k') | content/browser/frame_host/frame_tree_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698