Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_impl.h |
| diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h |
| index 71afa041fd9bba08b81c2c7aceed1b056e0f49ed..94207c5a43e1fcfc19f129683b863f056cac7ed0 100644 |
| --- a/content/browser/frame_host/render_frame_host_impl.h |
| +++ b/content/browser/frame_host/render_frame_host_impl.h |
| @@ -94,6 +94,13 @@ class CONTENT_EXPORT RenderFrameHostImpl |
| : public RenderFrameHost, |
| public BrowserAccessibilityDelegate { |
| 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. |
| + static const double kLoadingProgressNotStarted; |
| + static const double kLoadingProgressMinimum; |
| + static const double kLoadingProgressDone; |
| + |
| // Keeps track of the state of the RenderFrameHostImpl, particularly with |
| // respect to swap out. |
| enum RenderFrameHostImplState { |
| @@ -203,6 +210,16 @@ class CONTENT_EXPORT RenderFrameHostImpl |
| RenderFrameHostDelegate* delegate() { return delegate_; } |
| FrameTreeNode* frame_tree_node() { return frame_tree_node_; } |
| + void set_is_loading(bool is_loading) { |
| + is_loading_ = is_loading; |
| + } |
| + bool is_loading() const { return is_loading_; } |
|
clamy
2015/02/24 13:54:55
nit: add an empty line above (same below).
Fabrice (no longer in Chrome)
2015/02/26 13:44:12
I am not exactly sure what the rule is here, I can
clamy
2015/02/26 16:05:00
Acknowledged. I guess it is fine in that case sinc
|
| + |
| + void set_loading_progress(double loading_progress) { |
| + loading_progress_ = loading_progress; |
| + } |
| + double loading_progress() const { return loading_progress_; } |
| + |
| // This returns the RenderFrameHost's owned RenderWidgetHost if it has one, |
| // or else it returns nullptr. |
| // If the RenderFrameHost is the page's main frame, this returns instead a |
| @@ -663,6 +680,13 @@ class CONTENT_EXPORT RenderFrameHostImpl |
| // PlzNavigate: all navigations require a beforeUnload ACK. |
| bool unload_ack_is_for_navigation_; |
| + // Boolean value indicating whether this RFH in the process of loading a |
|
clamy
2015/02/24 13:54:55
"is in the process..."
Fabrice (no longer in Chrome)
2015/02/26 13:44:12
Done.
|
| + // document or not. |
| + bool is_loading_; |
| + |
| + // Double value representing this RFH's loading progress (from 0 to 1). |
| + double loading_progress_; |
| + |
| // Used to swap out or shut down this RFH when the unload event is taking too |
| // long to execute, depending on the number of active frames in the |
| // SiteInstance. |