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

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

Issue 818853005: Store NavigationEntryImpl data into NavigationRequest for later usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor change rebase. Created 5 years, 11 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/navigation_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
#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);
};
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698