Chromium Code Reviews| Index: content/browser/frame_host/navigation_request.h |
| diff --git a/content/browser/frame_host/navigation_request.h b/content/browser/frame_host/navigation_request.h |
| index 44bbc309ba99e09e2eae6b87a2cf6d25639091cd..f965b2d1d66848b920f728413b0e8276cb93192e 100644 |
| --- a/content/browser/frame_host/navigation_request.h |
| +++ b/content/browser/frame_host/navigation_request.h |
| @@ -7,11 +7,13 @@ |
| #include "base/basictypes.h" |
| #include "base/memory/ref_counted.h" |
| -#include "content/browser/frame_host/navigation_request_info.h" |
| +#include "base/memory/scoped_ptr.h" |
| #include "content/common/content_export.h" |
| +#include "content/common/navigation_params.h" |
| namespace content { |
| class ResourceRequestBody; |
| +struct NavigationRequestInfo; |
| // PlzNavigate |
| // A UI thread object that owns a navigation request until it commits. It |
| @@ -21,31 +23,43 @@ class ResourceRequestBody; |
| // the navigation following its refactoring. |
| class NavigationRequest { |
| public: |
| - NavigationRequest(const NavigationRequestInfo& info, |
| - int64 frame_tree_node_id); |
| + NavigationRequest(int64 frame_tree_node_id, |
| + const CommonNavigationParams& common_params, |
| + const CommitNavigationParams& commit_params); |
| ~NavigationRequest(); |
| // Called on the UI thread by the RenderFrameHostManager which owns the |
| - // NavigationRequest. After calling this function, |body| can no longer be |
| - // manipulated on the UI thread. |
| - void BeginNavigation(scoped_refptr<ResourceRequestBody> body); |
| + // NavigationRequest. Takes ownership of |info|. After calling this function, |
| + // |body| can no longer be manipulated on the UI thread. |
| + void BeginNavigation(scoped_ptr<NavigationRequestInfo> info, |
| + scoped_refptr<ResourceRequestBody> body); |
| // Called on the UI thread by the RenderFrameHostManager which owns the |
| // NavigationRequest whenever this navigation request should be canceled. |
| void CancelNavigation(); |
| - const NavigationRequestInfo& info() const { return info_; } |
| - |
| int64 frame_tree_node_id() const { return frame_tree_node_id_; } |
| - |
| int64 navigation_request_id() const { return navigation_request_id_; } |
| + CommonNavigationParams& common_params() { return common_params_; } |
| + |
| + const CommitNavigationParams& commit_params() const { return commit_params_; } |
| + |
| + NavigationRequestInfo* info_for_test() const { return info_.get(); } |
| + |
| private: |
| const int64 navigation_request_id_; |
| - const NavigationRequestInfo info_; |
| const int64 frame_tree_node_id_; |
| + // Initialized on creation of the NavigationRequest. Sent to the renderer when |
| + // the navigation is ready to commit. |
| + CommonNavigationParams common_params_; |
| + const CommitNavigationParams commit_params_; |
|
Charlie Reis
2014/09/29 23:49:53
Why is only one of these const? Worth explaining
clamy
2014/09/30 00:40:58
I have added a comment to reflect what may be modi
|
| + |
| + // Initialized when beginning the navigation. |
| + scoped_ptr<NavigationRequestInfo> info_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(NavigationRequest); |
| }; |