| OLD | NEW |
| 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" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 FrameTreeNodeIDMap::iterator it = nodes->find(frame_tree_node_id); | 90 FrameTreeNodeIDMap::iterator it = nodes->find(frame_tree_node_id); |
| 91 return it == nodes->end() ? NULL : it->second; | 91 return it == nodes->end() ? NULL : it->second; |
| 92 } | 92 } |
| 93 | 93 |
| 94 FrameTreeNode* FrameTree::FindByID(int64 frame_tree_node_id) { | 94 FrameTreeNode* FrameTree::FindByID(int64 frame_tree_node_id) { |
| 95 FrameTreeNode* node = NULL; | 95 FrameTreeNode* node = NULL; |
| 96 ForEach(base::Bind(&FrameTreeNodeForId, frame_tree_node_id, &node)); | 96 ForEach(base::Bind(&FrameTreeNodeForId, frame_tree_node_id, &node)); |
| 97 return node; | 97 return node; |
| 98 } | 98 } |
| 99 | 99 |
| 100 FrameTreeNode* FrameTree::FindByRoutingID(int routing_id, int process_id) { | 100 FrameTreeNode* FrameTree::FindByRoutingID(int process_id, int routing_id) { |
| 101 RenderFrameHostImpl* render_frame_host = | 101 RenderFrameHostImpl* render_frame_host = |
| 102 RenderFrameHostImpl::FromID(process_id, routing_id); | 102 RenderFrameHostImpl::FromID(process_id, routing_id); |
| 103 if (render_frame_host) { | 103 if (render_frame_host) { |
| 104 FrameTreeNode* result = render_frame_host->frame_tree_node(); | 104 FrameTreeNode* result = render_frame_host->frame_tree_node(); |
| 105 if (this == result->frame_tree()) | 105 if (this == result->frame_tree()) |
| 106 return result; | 106 return result; |
| 107 } | 107 } |
| 108 | 108 |
| 109 RenderFrameProxyHost* render_frame_proxy_host = | 109 RenderFrameProxyHost* render_frame_proxy_host = |
| 110 RenderFrameProxyHost::FromID(process_id, routing_id); | 110 RenderFrameProxyHost::FromID(process_id, routing_id); |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 rvh->Shutdown(); | 325 rvh->Shutdown(); |
| 326 render_view_host_pending_shutdown_map_.erase(multi_iter); | 326 render_view_host_pending_shutdown_map_.erase(multi_iter); |
| 327 } | 327 } |
| 328 break; | 328 break; |
| 329 } | 329 } |
| 330 CHECK(render_view_host_found); | 330 CHECK(render_view_host_found); |
| 331 } | 331 } |
| 332 } | 332 } |
| 333 | 333 |
| 334 } // namespace content | 334 } // namespace content |
| OLD | NEW |