Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: content/browser/frame_host/frame_tree.h

Issue 1080143003: Move DidStartLoading, DidStopLoading, DidChangeLoadProgress to RFHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // Updates the overall load progress and notifies the WebContents.
134 void UpdateLoadProgress();
135
133 // Returns this FrameTree's total load progress. 136 // Returns this FrameTree's total load progress.
134 double GetLoadProgress(); 137 double load_progress() { return load_progress_; }
135 138
136 // Resets the load progress on all nodes in this FrameTree. 139 // Resets the load progress on all nodes in this FrameTree.
137 void ResetLoadProgress(); 140 void ResetLoadProgress();
138 141
139 // Returns true if at least one of the nodes in this FrameTree is loading. 142 // Returns true if at least one of the nodes in this FrameTree is loading.
140 bool IsLoading(); 143 bool IsLoading();
141 144
142 private: 145 private:
143 typedef base::hash_map<int, RenderViewHostImpl*> RenderViewHostMap; 146 typedef base::hash_map<int, RenderViewHostImpl*> RenderViewHostMap;
144 typedef std::multimap<int, RenderViewHostImpl*> RenderViewHostMultiMap; 147 typedef std::multimap<int, RenderViewHostImpl*> RenderViewHostMultiMap;
(...skipping 26 matching lines...) Expand all
171 // meantime, they are kept in this map, as they should not be reused (part of 174 // meantime, they are kept in this map, as they should not be reused (part of
172 // their state is already gone away). 175 // their state is already gone away).
173 RenderViewHostMultiMap render_view_host_pending_shutdown_map_; 176 RenderViewHostMultiMap render_view_host_pending_shutdown_map_;
174 177
175 scoped_ptr<FrameTreeNode> root_; 178 scoped_ptr<FrameTreeNode> root_;
176 179
177 int64 focused_frame_tree_node_id_; 180 int64 focused_frame_tree_node_id_;
178 181
179 base::Callback<void(RenderFrameHost*)> on_frame_removed_; 182 base::Callback<void(RenderFrameHost*)> on_frame_removed_;
180 183
184 // Overall load progress.
185 double load_progress_;
186
181 DISALLOW_COPY_AND_ASSIGN(FrameTree); 187 DISALLOW_COPY_AND_ASSIGN(FrameTree);
182 }; 188 };
183 189
184 } // namespace content 190 } // namespace content
185 191
186 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 192 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698