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 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 // Executes |on_node| on each node in the frame tree. If |on_node| returns | 65 // Executes |on_node| on each node in the frame tree. If |on_node| returns |
66 // false, terminates the iteration immediately. Returning false is useful | 66 // false, terminates the iteration immediately. Returning false is useful |
67 // if |on_node| is just doing a search over the tree. The iteration proceeds | 67 // if |on_node| is just doing a search over the tree. The iteration proceeds |
68 // top-down and visits a node before adding its children to the queue, making | 68 // top-down and visits a node before adding its children to the queue, making |
69 // it safe to remove children during the callback. | 69 // it safe to remove children during the callback. |
70 void ForEach(const base::Callback<bool(FrameTreeNode*)>& on_node) const; | 70 void ForEach(const base::Callback<bool(FrameTreeNode*)>& on_node) const; |
71 | 71 |
72 // Frame tree manipulation routines. | 72 // Frame tree manipulation routines. |
73 RenderFrameHostImpl* AddFrame(FrameTreeNode* parent, | 73 RenderFrameHostImpl* AddFrame(FrameTreeNode* parent, |
| 74 int process_id, |
74 int new_routing_id, | 75 int new_routing_id, |
75 const std::string& frame_name); | 76 const std::string& frame_name); |
76 void RemoveFrame(FrameTreeNode* child); | 77 void RemoveFrame(FrameTreeNode* child); |
77 | 78 |
78 // This method walks the entire frame tree and creates a RenderFrameProxyHost | 79 // This method walks the entire frame tree and creates a RenderFrameProxyHost |
79 // for the given |site_instance| in each node except the |source| one -- | 80 // for the given |site_instance| in each node except the |source| one -- |
80 // the source will have a RenderFrameHost. It assumes that no frame tree | 81 // the source will have a RenderFrameHost. It assumes that no frame tree |
81 // nodes already have RenderFrameProxyHost for the given |site_instance|. | 82 // nodes already have RenderFrameProxyHost for the given |site_instance|. |
82 void CreateProxiesForSiteInstance( | 83 void CreateProxiesForSiteInstance( |
83 FrameTreeNode* source, | 84 FrameTreeNode* source, |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 int64 focused_frame_tree_node_id_; | 165 int64 focused_frame_tree_node_id_; |
165 | 166 |
166 base::Callback<void(RenderFrameHost*)> on_frame_removed_; | 167 base::Callback<void(RenderFrameHost*)> on_frame_removed_; |
167 | 168 |
168 DISALLOW_COPY_AND_ASSIGN(FrameTree); | 169 DISALLOW_COPY_AND_ASSIGN(FrameTree); |
169 }; | 170 }; |
170 | 171 |
171 } // namespace content | 172 } // namespace content |
172 | 173 |
173 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 174 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
OLD | NEW |