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

Unified Diff: content/browser/frame_host/frame_tree_node.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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/frame_tree_node.h
diff --git a/content/browser/frame_host/frame_tree_node.h b/content/browser/frame_host/frame_tree_node.h
index e321d3a51b9923656f747c969bed0dd38ba12f7f..7e1add1231f694ef0e37f29fb9f34bafd24ee55b 100644
--- a/content/browser/frame_host/frame_tree_node.h
+++ b/content/browser/frame_host/frame_tree_node.h
@@ -31,15 +31,6 @@ class RenderFrameHostImpl;
// are frame-specific (as opposed to page-specific).
class CONTENT_EXPORT FrameTreeNode {
public:
- // These values indicate the loading progress status. The minimum progress
- // value matches what Blink's ProgressTracker has traditionally used for a
- // minimum progress value.
- // TODO(fdegans): Move these values to the implementation when the relevant
- // IPCs are moved from WebContentsImpl to RenderFrameHost.
- static const double kLoadingProgressNotStarted;
- static const double kLoadingProgressMinimum;
- static const double kLoadingProgressDone;
-
// Returns the FrameTreeNode with the given global |frame_tree_node_id|,
// regardless of which FrameTree it is in.
static FrameTreeNode* GloballyFindByID(int64 frame_tree_node_id);
@@ -135,11 +126,6 @@ class CONTENT_EXPORT FrameTreeNode {
// Returns true if this node is in a loading state.
bool IsLoading() const;
- // Sets this node's loading progress (from 0 to 1).
- void set_loading_progress(double loading_progress) {
- loading_progress_ = loading_progress;
- }
-
// Returns this node's loading progress.
double loading_progress() const { return loading_progress_; }
@@ -157,6 +143,26 @@ class CONTENT_EXPORT FrameTreeNode {
// due to the commit of the navigation.
void ResetNavigationRequest(bool is_commit);
+ // Returns true if this node is in a state where the loading progress is being
+ // tracked.
+ bool has_started_loading() const;
+
+ // Resets this node's loading progress.
+ void reset_loading_progress();
+
+ // A RenderFrameHost in this node started loading.
+ // |to_different_document| will be true unless the load is a fragment
+ // navigation, or triggered by history.pushState/replaceState.
+ void DidStartLoading(bool to_different_document);
+
+ // A RenderFrameHost in this node stopped loading.
+ void DidStopLoading();
+
+ // The load progress for a RenderFrameHost in this node was updated to
+ // |load_progress|. This will notify the FrameTree which will in turn notify
+ // the WebContents.
+ void DidChangeLoadProgress(double load_progress);
+
private:
void set_parent(FrameTreeNode* parent) { parent_ = parent; }
« 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