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