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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 | 123 |
124 // Keeps track of which RenderFrameHosts are using each RenderViewHost. When | 124 // Keeps track of which RenderFrameHosts are using each RenderViewHost. When |
125 // the number drops to zero, we call Shutdown on the RenderViewHost. | 125 // the number drops to zero, we call Shutdown on the RenderViewHost. |
126 void RegisterRenderFrameHost(RenderFrameHostImpl* render_frame_host); | 126 void RegisterRenderFrameHost(RenderFrameHostImpl* render_frame_host); |
127 void UnregisterRenderFrameHost(RenderFrameHostImpl* render_frame_host); | 127 void UnregisterRenderFrameHost(RenderFrameHostImpl* render_frame_host); |
128 | 128 |
129 // This is only meant to be called by FrameTreeNode. Triggers calling | 129 // This is only meant to be called by FrameTreeNode. Triggers calling |
130 // the listener installed by SetFrameRemoveListener. | 130 // the listener installed by SetFrameRemoveListener. |
131 void FrameRemoved(FrameTreeNode* frame); | 131 void FrameRemoved(FrameTreeNode* frame); |
132 | 132 |
133 // Returns this tree's total load progress. | |
clamy
2015/03/24 14:52:23
s/tree/FrameTree
Fabrice (no longer in Chrome)
2015/03/24 16:28:50
Done.
| |
134 double GetLoadProgress(); | |
135 | |
136 // Resets the load progress on each node of this frame tree. | |
clamy
2015/03/24 14:52:23
s/frame tree/FrameTree
Fabrice (no longer in Chrome)
2015/03/24 16:28:50
Done.
| |
137 void ResetLoadProgress(); | |
138 | |
139 // Returns true if at least one of the nodes in this frame tree is loading. | |
clamy
2015/03/24 14:52:23
s/frame tree/FrameTree
Fabrice (no longer in Chrome)
2015/03/24 16:28:50
Done.
| |
140 bool IsLoading(); | |
141 | |
133 private: | 142 private: |
134 typedef base::hash_map<int, RenderViewHostImpl*> RenderViewHostMap; | 143 typedef base::hash_map<int, RenderViewHostImpl*> RenderViewHostMap; |
135 typedef std::multimap<int, RenderViewHostImpl*> RenderViewHostMultiMap; | 144 typedef std::multimap<int, RenderViewHostImpl*> RenderViewHostMultiMap; |
136 | 145 |
137 // A variation to the public ForEach method with a difference that the subtree | 146 // A variation to the public ForEach method with a difference that the subtree |
138 // starting at |skip_this_subtree| will not be recursed into. | 147 // starting at |skip_this_subtree| will not be recursed into. |
139 void ForEach(const base::Callback<bool(FrameTreeNode*)>& on_node, | 148 void ForEach(const base::Callback<bool(FrameTreeNode*)>& on_node, |
140 FrameTreeNode* skip_this_subtree) const; | 149 FrameTreeNode* skip_this_subtree) const; |
141 | 150 |
142 // These delegates are installed into all the RenderViewHosts and | 151 // These delegates are installed into all the RenderViewHosts and |
(...skipping 25 matching lines...) Expand all Loading... | |
168 int64 focused_frame_tree_node_id_; | 177 int64 focused_frame_tree_node_id_; |
169 | 178 |
170 base::Callback<void(RenderFrameHost*)> on_frame_removed_; | 179 base::Callback<void(RenderFrameHost*)> on_frame_removed_; |
171 | 180 |
172 DISALLOW_COPY_AND_ASSIGN(FrameTree); | 181 DISALLOW_COPY_AND_ASSIGN(FrameTree); |
173 }; | 182 }; |
174 | 183 |
175 } // namespace content | 184 } // namespace content |
176 | 185 |
177 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 186 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
OLD | NEW |