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 502fc6d7343c9d176791a1237254322766315b50..02058bed7ef5880e086a9bbb2c27c62b492b3d18 100644 |
| --- a/content/browser/frame_host/navigation_request.h |
| +++ b/content/browser/frame_host/navigation_request.h |
| @@ -8,6 +8,7 @@ |
| #include "base/basictypes.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "content/browser/frame_host/navigation_entry_impl.h" |
|
clamy
2015/01/19 15:53:46
Why did you remove the forward declaration in favo
carlosk
2015/01/19 16:08:52
It was required now because of the restore_type()
clamy
2015/01/19 16:11:10
Acknowledged.
|
| #include "content/browser/loader/navigation_url_loader_delegate.h" |
| #include "content/common/content_export.h" |
| #include "content/common/navigation_params.h" |
| @@ -17,6 +18,7 @@ namespace content { |
| class FrameTreeNode; |
| class NavigationURLLoader; |
| class ResourceRequestBody; |
| +class SiteInstanceImpl; |
| struct NavigationRequestInfo; |
| // PlzNavigate |
| @@ -51,7 +53,8 @@ class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate { |
| NavigationRequest(FrameTreeNode* frame_tree_node, |
| const CommonNavigationParams& common_params, |
| - const CommitNavigationParams& commit_params); |
| + const CommitNavigationParams& commit_params, |
| + const NavigationEntryImpl* navitation_entry); |
| ~NavigationRequest() override; |
| @@ -63,12 +66,30 @@ class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate { |
| CommonNavigationParams& common_params() { return common_params_; } |
| + const CommonNavigationParams& common_params() const { return common_params_; } |
| + |
| const CommitNavigationParams& commit_params() const { return commit_params_; } |
| NavigationURLLoader* loader_for_testing() const { return loader_.get(); } |
| NavigationState state() const { return state_; } |
| + SiteInstanceImpl* source_site_instance() const { |
| + return source_site_instance_.get(); |
| + } |
| + |
| + SiteInstanceImpl* dest_site_instance() const { |
| + return dest_site_instance_.get(); |
| + } |
| + |
| + NavigationEntryImpl::RestoreType restore_type() const { |
| + return restore_type_; |
| + }; |
| + |
| + bool is_view_source() const { return is_view_source_; }; |
| + |
| + int bindings() const { return bindings_; }; |
| + |
| void SetWaitingForRendererResponse() { |
| DCHECK(state_ == NOT_STARTED); |
| state_ = WAITING_FOR_RENDERER_RESPONSE; |
| @@ -97,6 +118,15 @@ class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate { |
| scoped_ptr<NavigationURLLoader> loader_; |
| + // These next items are used in browser-initiated navigations to store |
| + // information from the NavigationEntryImpl that is required after request |
| + // creation time. |
| + scoped_refptr<SiteInstanceImpl> source_site_instance_; |
| + scoped_refptr<SiteInstanceImpl> dest_site_instance_; |
| + NavigationEntryImpl::RestoreType restore_type_; |
| + bool is_view_source_; |
| + int bindings_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(NavigationRequest); |
| }; |