Chromium Code Reviews| 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 458887baaf6403ba538c8775fadf7fbf695e1ba6..6f333613d86efb013be93e03cd0447f162f080f2 100644 |
| --- a/content/browser/frame_host/frame_tree_node.h |
| +++ b/content/browser/frame_host/frame_tree_node.h |
| @@ -30,6 +30,13 @@ 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. |
|
nasko
2015/03/24 17:26:11
nit: I still think we can hide those to be private
Fabrice (no longer in Chrome)
2015/03/25 17:35:01
The issue is that right now, we need to access the
nasko
2015/03/25 22:48:03
It can be hidden from FrameTree, as it will not ne
Fabrice (no longer in Chrome)
2015/03/26 11:05:24
I'm readding the TODO, we'll see if we can remove
|
| + 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); |
| @@ -122,11 +129,16 @@ class CONTENT_EXPORT FrameTreeNode { |
| bool IsDescendantOf(FrameTreeNode* other) const; |
| - // Returns true if this frame is in a loading state. |
| + // Returns true if this node is in a loading state. |
| bool IsLoading() const; |
| - // Returns the loading progress of this frame. |
| - double GetLoadingProgress() 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_; } |
| private: |
| void set_parent(FrameTreeNode* parent) { parent_ = parent; } |
| @@ -178,6 +190,9 @@ class CONTENT_EXPORT FrameTreeNode { |
| // flags when a navigation for this frame commits. |
| SandboxFlags effective_sandbox_flags_; |
| + // Used to track this node's loading progress (from 0 to 1). |
| + double loading_progress_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
| }; |