| 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_node| will not be recursed into. |
| 140 void ForEach(const base::Callback<bool(FrameTreeNode*)>& on_node, |
| 141 FrameTreeNode* skip_this_subtree) const; |
| 142 |
| 138 // These delegates are installed into all the RenderViewHosts and | 143 // These delegates are installed into all the RenderViewHosts and |
| 139 // RenderFrameHosts that we create. | 144 // RenderFrameHosts that we create. |
| 140 RenderFrameHostDelegate* render_frame_delegate_; | 145 RenderFrameHostDelegate* render_frame_delegate_; |
| 141 RenderViewHostDelegate* render_view_delegate_; | 146 RenderViewHostDelegate* render_view_delegate_; |
| 142 RenderWidgetHostDelegate* render_widget_delegate_; | 147 RenderWidgetHostDelegate* render_widget_delegate_; |
| 143 RenderFrameHostManager::Delegate* manager_delegate_; | 148 RenderFrameHostManager::Delegate* manager_delegate_; |
| 144 | 149 |
| 145 // Map of SiteInstance ID to a RenderViewHost. This allows us to look up the | 150 // Map of SiteInstance ID to a RenderViewHost. This allows us to look up the |
| 146 // RenderViewHost for a given SiteInstance when creating RenderFrameHosts. | 151 // RenderViewHost for a given SiteInstance when creating RenderFrameHosts. |
| 147 // Combined with the refcount on RenderViewHost, this allows us to call | 152 // Combined with the refcount on RenderViewHost, this allows us to call |
| (...skipping 16 matching lines...) Expand all Loading... |
| 164 int64 focused_frame_tree_node_id_; | 169 int64 focused_frame_tree_node_id_; |
| 165 | 170 |
| 166 base::Callback<void(RenderFrameHost*)> on_frame_removed_; | 171 base::Callback<void(RenderFrameHost*)> on_frame_removed_; |
| 167 | 172 |
| 168 DISALLOW_COPY_AND_ASSIGN(FrameTree); | 173 DISALLOW_COPY_AND_ASSIGN(FrameTree); |
| 169 }; | 174 }; |
| 170 | 175 |
| 171 } // namespace content | 176 } // namespace content |
| 172 | 177 |
| 173 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 178 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
| OLD | NEW |