| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 44   // RenderFrameHostManagers. | 44   // RenderFrameHostManagers. | 
| 45   // TODO(creis): This set of delegates will change as we move things to | 45   // TODO(creis): This set of delegates will change as we move things to | 
| 46   // Navigator. | 46   // Navigator. | 
| 47   FrameTree(Navigator* navigator, | 47   FrameTree(Navigator* navigator, | 
| 48             RenderFrameHostDelegate* render_frame_delegate, | 48             RenderFrameHostDelegate* render_frame_delegate, | 
| 49             RenderViewHostDelegate* render_view_delegate, | 49             RenderViewHostDelegate* render_view_delegate, | 
| 50             RenderWidgetHostDelegate* render_widget_delegate, | 50             RenderWidgetHostDelegate* render_widget_delegate, | 
| 51             RenderFrameHostManager::Delegate* manager_delegate); | 51             RenderFrameHostManager::Delegate* manager_delegate); | 
| 52   ~FrameTree(); | 52   ~FrameTree(); | 
| 53 | 53 | 
| 54   FrameTreeNode* root() const { return root_.get(); } | 54   FrameTreeNode* root() const { return root_; } | 
| 55 | 55 | 
| 56   // Returns the FrameTreeNode with the given |frame_tree_node_id| if it is part | 56   // Returns the FrameTreeNode with the given |frame_tree_node_id| if it is part | 
| 57   // of this FrameTree. | 57   // of this FrameTree. | 
| 58   FrameTreeNode* FindByID(int frame_tree_node_id); | 58   FrameTreeNode* FindByID(int frame_tree_node_id); | 
| 59 | 59 | 
| 60   // Returns the FrameTreeNode with the given renderer-specific |routing_id|. | 60   // Returns the FrameTreeNode with the given renderer-specific |routing_id|. | 
| 61   FrameTreeNode* FindByRoutingID(int process_id, int routing_id); | 61   FrameTreeNode* FindByRoutingID(int process_id, int routing_id); | 
| 62 | 62 | 
| 63   // Returns the first frame in this tree with the given |name|, or the main | 63   // Returns the first frame in this tree with the given |name|, or the main | 
| 64   // frame if |name| is empty. | 64   // frame if |name| is empty. | 
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 173   // the map will be cleared before we delete the RenderFrameHosts in the tree. | 173   // the map will be cleared before we delete the RenderFrameHosts in the tree. | 
| 174   RenderViewHostMap render_view_host_map_; | 174   RenderViewHostMap render_view_host_map_; | 
| 175 | 175 | 
| 176   // Map of SiteInstance ID to RenderViewHosts that are pending shutdown. The | 176   // Map of SiteInstance ID to RenderViewHosts that are pending shutdown. The | 
| 177   // renderers of these RVH are currently executing the unload event in | 177   // renderers of these RVH are currently executing the unload event in | 
| 178   // background. When the SwapOutACK is received, they will be deleted. In the | 178   // background. When the SwapOutACK is received, they will be deleted. In the | 
| 179   // meantime, they are kept in this map, as they should not be reused (part of | 179   // meantime, they are kept in this map, as they should not be reused (part of | 
| 180   // their state is already gone away). | 180   // their state is already gone away). | 
| 181   RenderViewHostMultiMap render_view_host_pending_shutdown_map_; | 181   RenderViewHostMultiMap render_view_host_pending_shutdown_map_; | 
| 182 | 182 | 
| 183   scoped_ptr<FrameTreeNode> root_; | 183   // This is an owned ptr to the root FrameTreeNode, which never changes over | 
|  | 184   // the lifetime of the FrameTree. It is not a scoped_ptr because we need the | 
|  | 185   // pointer to remain valid even while the FrameTreeNode is being destroyed, | 
|  | 186   // since it's common for a node to test whether it's the root node. | 
|  | 187   FrameTreeNode* root_; | 
| 184 | 188 | 
| 185   int focused_frame_tree_node_id_; | 189   int focused_frame_tree_node_id_; | 
| 186 | 190 | 
| 187   base::Callback<void(RenderFrameHost*)> on_frame_removed_; | 191   base::Callback<void(RenderFrameHost*)> on_frame_removed_; | 
| 188 | 192 | 
| 189   // Overall load progress. | 193   // Overall load progress. | 
| 190   double load_progress_; | 194   double load_progress_; | 
| 191 | 195 | 
| 192   DISALLOW_COPY_AND_ASSIGN(FrameTree); | 196   DISALLOW_COPY_AND_ASSIGN(FrameTree); | 
| 193 }; | 197 }; | 
| 194 | 198 | 
| 195 }  // namespace content | 199 }  // namespace content | 
| 196 | 200 | 
| 197 #endif  // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 201 #endif  // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 
| OLD | NEW | 
|---|