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

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

Issue 1690633002: Revert of Remove the is_loading_ field from WebContentsImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « content/browser/frame_host/frame_tree.cc ('k') | content/browser/frame_host/frame_tree_node.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_NODE_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // Returns true if this node is in a state where the loading progress is being 228 // Returns true if this node is in a state where the loading progress is being
229 // tracked. 229 // tracked.
230 bool has_started_loading() const; 230 bool has_started_loading() const;
231 231
232 // Resets this node's loading progress. 232 // Resets this node's loading progress.
233 void reset_loading_progress(); 233 void reset_loading_progress();
234 234
235 // A RenderFrameHost in this node started loading. 235 // A RenderFrameHost in this node started loading.
236 // |to_different_document| will be true unless the load is a fragment 236 // |to_different_document| will be true unless the load is a fragment
237 // navigation, or triggered by history.pushState/replaceState. 237 // navigation, or triggered by history.pushState/replaceState.
238 // |was_previously_loading| is false if the FrameTree was not loading before. 238 void DidStartLoading(bool to_different_document);
239 // The caller is required to provide this boolean as the delegate should only
240 // be called if the FrameTree went from non-loading to loading state.
241 // However, when it is called, the FrameTree should be in a loading state.
242 void DidStartLoading(bool to_different_document, bool was_previously_loading);
243 239
244 // A RenderFrameHost in this node stopped loading. 240 // A RenderFrameHost in this node stopped loading.
245 void DidStopLoading(); 241 void DidStopLoading();
246 242
247 // The load progress for a RenderFrameHost in this node was updated to 243 // The load progress for a RenderFrameHost in this node was updated to
248 // |load_progress|. This will notify the FrameTree which will in turn notify 244 // |load_progress|. This will notify the FrameTree which will in turn notify
249 // the WebContents. 245 // the WebContents.
250 void DidChangeLoadProgress(double load_progress); 246 void DidChangeLoadProgress(double load_progress);
251 247
252 // Called when the user directed the page to stop loading. Stops all loads 248 // Called when the user directed the page to stop loading. Stops all loads
253 // happening in the FrameTreeNode. This method should be used with 249 // happening in the FrameTreeNode. This method should be used with
254 // FrameTree::ForEach to stop all loads in the entire FrameTree. 250 // FrameTree::ForEach to stop all loads in the entire FrameTree.
255 bool StopLoading(); 251 bool StopLoading();
256 252
257 // Returns the time this frame was last focused. 253 // Returns the time this frame was last focused.
258 base::TimeTicks last_focus_time() const { return last_focus_time_; } 254 base::TimeTicks last_focus_time() const { return last_focus_time_; }
259 255
260 // Called when this node becomes focused. Updates the node's last focused 256 // Called when this node becomes focused. Updates the node's last focused
261 // time and notifies observers. 257 // time and notifies observers.
262 void DidFocus(); 258 void DidFocus();
263 259
264 // Called when the user closed the modal dialogue for BeforeUnload and
265 // cancelled the navigation. This should stop the loads.
266 void BeforeUnloadCanceled();
267
268 private: 260 private:
269 class OpenerDestroyedObserver; 261 class OpenerDestroyedObserver;
270 262
271 void set_parent(FrameTreeNode* parent) { parent_ = parent; } 263 void set_parent(FrameTreeNode* parent) { parent_ = parent; }
272 264
273 // The next available browser-global FrameTreeNode ID. 265 // The next available browser-global FrameTreeNode ID.
274 static int next_frame_tree_node_id_; 266 static int next_frame_tree_node_id_;
275 267
276 // The FrameTree that owns us. 268 // The FrameTree that owns us.
277 FrameTree* frame_tree_; // not owned. 269 FrameTree* frame_tree_; // not owned.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 base::ObserverList<Observer> observers_; 341 base::ObserverList<Observer> observers_;
350 342
351 base::TimeTicks last_focus_time_; 343 base::TimeTicks last_focus_time_;
352 344
353 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); 345 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode);
354 }; 346 };
355 347
356 } // namespace content 348 } // namespace content
357 349
358 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ 350 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree.cc ('k') | content/browser/frame_host/frame_tree_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698