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

Unified Diff: content/browser/frame_host/frame_tree_node.h

Issue 983973002: Revert of Refactor the loading tracking logic in WebContentsImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed patch conflict Created 5 years, 9 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 | « no previous file | 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 cc10ce9c0148c70a155b8ddbe03faf9c51e9dc8f..5be831b7953e1404c44464c4940ea3fec25cea20 100644
--- a/content/browser/frame_host/frame_tree_node.h
+++ b/content/browser/frame_host/frame_tree_node.h
@@ -30,6 +30,7 @@ class RenderFrameHostImpl;
// are frame-specific (as opposed to page-specific).
class CONTENT_EXPORT FrameTreeNode {
public:
+
FrameTreeNode(FrameTree* frame_tree,
Navigator* navigator,
RenderFrameHostDelegate* render_frame_delegate,
@@ -110,18 +111,19 @@ class CONTENT_EXPORT FrameTreeNode {
return replication_state_;
}
+ void set_is_loading(bool is_loading) {
+ is_loading_ = is_loading;
+ }
+ bool is_loading() const {
+ return is_loading_;
+ }
+
RenderFrameHostImpl* current_frame_host() const {
return render_manager_.current_frame_host();
}
bool IsDescendantOf(FrameTreeNode* other) const;
- // Returns true if this frame is in a loading state.
- bool IsLoading() const;
-
- // Returns the loading progress of this frame.
- double GetLoadingProgress() const;
-
private:
void set_parent(FrameTreeNode* parent) { parent_ = parent; }
@@ -137,7 +139,7 @@ class CONTENT_EXPORT FrameTreeNode {
// Manages creation and swapping of RenderFrameHosts for this frame. This
// must be declared before |children_| so that it gets deleted after them.
- // That's currently necessary so that RenderFrameHostImpl's destructor can
+ // That's currently necessary so that RenderFrameHostImpl's destructor can
// call GetProcess.
RenderFrameHostManager render_manager_;
@@ -172,6 +174,15 @@ class CONTENT_EXPORT FrameTreeNode {
// flags when a navigation for this frame commits.
SandboxFlags effective_sandbox_flags_;
+ // Boolean value indicating whether the frame is in the process of loading
+ // a document or not. In cross-process transfer navigation the DidStartLoading
+ // message is received from both existing RenderFrame and from the pending
+ // RenderFrame. However, there will be only one DidStopLoading message sent by
+ // the pending-which-becomes-current RenderFrame. Since both renderers belong
+ // to the FrameTreeNode, it is better to ask it about the loading status than
+ // RenderFrameHost or using a counter to balance the events out.
+ bool is_loading_;
+
DISALLOW_COPY_AND_ASSIGN(FrameTreeNode);
};
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698