| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 int routing_id, | 114 int routing_id, |
| 115 int main_frame_routing_id, | 115 int main_frame_routing_id, |
| 116 bool swapped_out, | 116 bool swapped_out, |
| 117 bool hidden); | 117 bool hidden); |
| 118 | 118 |
| 119 // Returns the existing RenderViewHost for a new RenderFrameHost. | 119 // Returns the existing RenderViewHost for a new RenderFrameHost. |
| 120 // There should always be such a RenderViewHost, because the main frame | 120 // There should always be such a RenderViewHost, because the main frame |
| 121 // RenderFrameHost for each SiteInstance should be created before subframes. | 121 // RenderFrameHost for each SiteInstance should be created before subframes. |
| 122 RenderViewHostImpl* GetRenderViewHost(SiteInstance* site_instance); | 122 RenderViewHostImpl* GetRenderViewHost(SiteInstance* site_instance); |
| 123 | 123 |
| 124 // Keeps track of which RenderFrameHosts and RenderFrameProxyHosts are using | 124 // Keeps track of which RenderFrameHosts are using each RenderViewHost. When |
| 125 // each RenderViewHost. When the number drops to zero, we call Shutdown on | 125 // the number drops to zero, we call Shutdown on the RenderViewHost. |
| 126 // the RenderViewHost. | 126 void RegisterRenderFrameHost(RenderFrameHostImpl* render_frame_host); |
| 127 void AddRenderViewHostRef(RenderViewHostImpl* render_view_host); | 127 void UnregisterRenderFrameHost(RenderFrameHostImpl* render_frame_host); |
| 128 void ReleaseRenderViewHostRef(RenderViewHostImpl* render_view_host); | |
| 129 | 128 |
| 130 // This is only meant to be called by FrameTreeNode. Triggers calling | 129 // This is only meant to be called by FrameTreeNode. Triggers calling |
| 131 // the listener installed by SetFrameRemoveListener. | 130 // the listener installed by SetFrameRemoveListener. |
| 132 void FrameRemoved(FrameTreeNode* frame); | 131 void FrameRemoved(FrameTreeNode* frame); |
| 133 | 132 |
| 134 // Updates the overall load progress and notifies the WebContents. | 133 // Updates the overall load progress and notifies the WebContents. |
| 135 void UpdateLoadProgress(); | 134 void UpdateLoadProgress(); |
| 136 | 135 |
| 137 // Returns this FrameTree's total load progress. | 136 // Returns this FrameTree's total load progress. |
| 138 double load_progress() { return load_progress_; } | 137 double load_progress() { return load_progress_; } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 184 |
| 186 // Overall load progress. | 185 // Overall load progress. |
| 187 double load_progress_; | 186 double load_progress_; |
| 188 | 187 |
| 189 DISALLOW_COPY_AND_ASSIGN(FrameTree); | 188 DISALLOW_COPY_AND_ASSIGN(FrameTree); |
| 190 }; | 189 }; |
| 191 | 190 |
| 192 } // namespace content | 191 } // namespace content |
| 193 | 192 |
| 194 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 193 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
| OLD | NEW |