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

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

Issue 1080073004: PlzNavigate: move ownership of the NavigationRequest to the FrameTreeNode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 30843d8f2723c8663f30370e980322f67fa3724d..33f9ff9218414a7c92271227cfc53206c747428f 100644
--- a/content/browser/frame_host/frame_tree_node.h
+++ b/content/browser/frame_host/frame_tree_node.h
@@ -11,6 +11,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
+#include "content/browser/frame_host/navigation_request.h"
Fabrice (no longer in Chrome) 2015/04/15 12:44:50 nit: I think we can forward-declare here. We are a
clamy 2015/04/16 12:12:30 Done.
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/frame_host/render_frame_host_manager.h"
#include "content/common/content_export.h"
@@ -142,6 +143,20 @@ class CONTENT_EXPORT FrameTreeNode {
// Returns this node's loading progress.
double loading_progress() const { return loading_progress_; }
+ NavigationRequest* navigation_request() { return navigation_request_.get(); }
+
+ // PlzNavigate
+ // Takes ownership of |navigation_request| and makes it the current
+ // NavigationRequest of this frame. This corresponds to the start of a new
+ // navigation. If there was an ongoing navigation request before calling this
+ // function, it is canceled. |navigation_request| should not be null.
+ void SetNavigationRequest(scoped_ptr<NavigationRequest> navigation_request);
+
+ // PlzNavigate
+ // Reset the current navigation request. |is_commit| is true if the reset is
+ // due to the commit of the navigation.
+ void ResetNavigationRequest(bool is_commit);
+
private:
void set_parent(FrameTreeNode* parent) { parent_ = parent; }
@@ -195,6 +210,11 @@ class CONTENT_EXPORT FrameTreeNode {
// Used to track this node's loading progress (from 0 to 1).
double loading_progress_;
+ // PlzNavigate
+ // Owns a navigation happening in this node until it is ready to commit (it
nasko 2015/04/15 20:36:04 nit: s/a navigation happening/ongoing NavigationRe
clamy 2015/04/16 12:12:30 Done.
+ // will then be owned by the current RenderFrameHost).
nasko 2015/04/15 20:36:04 nit: It might not be the current RFH, but the spec
clamy 2015/04/16 12:12:30 Done. I've also modified the comment to clarify th
+ scoped_ptr<NavigationRequest> navigation_request_;
+
DISALLOW_COPY_AND_ASSIGN(FrameTreeNode);
};
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree_node.cc » ('j') | content/browser/frame_host/frame_tree_node.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698