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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 // Keeps track of which RenderFrameHosts are using each RenderViewHost. When | 130 // Keeps track of which RenderFrameHosts are using each RenderViewHost. When |
131 // the number drops to zero, we call Shutdown on the RenderViewHost. | 131 // the number drops to zero, we call Shutdown on the RenderViewHost. |
132 void RegisterRenderFrameHost(RenderFrameHostImpl* render_frame_host); | 132 void RegisterRenderFrameHost(RenderFrameHostImpl* render_frame_host); |
133 void UnregisterRenderFrameHost(RenderFrameHostImpl* render_frame_host); | 133 void UnregisterRenderFrameHost(RenderFrameHostImpl* render_frame_host); |
134 | 134 |
135 private: | 135 private: |
136 typedef base::hash_map<int, RenderViewHostImpl*> RenderViewHostMap; | 136 typedef base::hash_map<int, RenderViewHostImpl*> RenderViewHostMap; |
137 typedef std::multimap<int, RenderViewHostImpl*> RenderViewHostMultiMap; | 137 typedef std::multimap<int, RenderViewHostImpl*> RenderViewHostMultiMap; |
138 | 138 |
| 139 // A variation to the public ForEach method with a difference that the subtree |
| 140 // starting at |skip_this_subtree| will not be recursed into. |
| 141 void ForEach(const base::Callback<bool(FrameTreeNode*)>& on_node, |
| 142 FrameTreeNode* skip_this_subtree) const; |
| 143 |
139 // These delegates are installed into all the RenderViewHosts and | 144 // These delegates are installed into all the RenderViewHosts and |
140 // RenderFrameHosts that we create. | 145 // RenderFrameHosts that we create. |
141 RenderFrameHostDelegate* render_frame_delegate_; | 146 RenderFrameHostDelegate* render_frame_delegate_; |
142 RenderViewHostDelegate* render_view_delegate_; | 147 RenderViewHostDelegate* render_view_delegate_; |
143 RenderWidgetHostDelegate* render_widget_delegate_; | 148 RenderWidgetHostDelegate* render_widget_delegate_; |
144 RenderFrameHostManager::Delegate* manager_delegate_; | 149 RenderFrameHostManager::Delegate* manager_delegate_; |
145 | 150 |
146 // Map of SiteInstance ID to a RenderViewHost. This allows us to look up the | 151 // Map of SiteInstance ID to a RenderViewHost. This allows us to look up the |
147 // RenderViewHost for a given SiteInstance when creating RenderFrameHosts. | 152 // RenderViewHost for a given SiteInstance when creating RenderFrameHosts. |
148 // Combined with the refcount on RenderViewHost, this allows us to call | 153 // Combined with the refcount on RenderViewHost, this allows us to call |
(...skipping 16 matching lines...) Expand all Loading... |
165 int64 focused_frame_tree_node_id_; | 170 int64 focused_frame_tree_node_id_; |
166 | 171 |
167 base::Callback<void(RenderFrameHost*)> on_frame_removed_; | 172 base::Callback<void(RenderFrameHost*)> on_frame_removed_; |
168 | 173 |
169 DISALLOW_COPY_AND_ASSIGN(FrameTree); | 174 DISALLOW_COPY_AND_ASSIGN(FrameTree); |
170 }; | 175 }; |
171 | 176 |
172 } // namespace content | 177 } // namespace content |
173 | 178 |
174 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 179 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
OLD | NEW |