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

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

Issue 648813002: PlzNavigate: Add first version of NavigationURLLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plz-navigate-prepare
Patch Set: rebase Created 6 years, 2 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 6f8f37bee6312029afdda2ea028c4b930e9488ca..eb5372113741e6ee9bb5e6d2eefd21ef957c76d7 100644
--- a/content/browser/frame_host/navigation_request.h
+++ b/content/browser/frame_host/navigation_request.h
@@ -8,12 +8,14 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "content/browser/loader/navigation_url_loader_delegate.h"
#include "content/common/content_export.h"
#include "content/common/navigation_params.h"
namespace content {
class FrameTreeNode;
+class NavigationURLLoader;
class ResourceRequestBody;
struct NavigationRequestInfo;
@@ -23,13 +25,13 @@ struct NavigationRequestInfo;
// ResourceDispatcherHost (that lives on the IO thread).
// TODO(clamy): Describe the interactions between the UI and IO thread during
// the navigation following its refactoring.
-class CONTENT_EXPORT NavigationRequest {
+class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate {
public:
NavigationRequest(FrameTreeNode* frame_tree_node,
const CommonNavigationParams& common_params,
const CommitNavigationParams& commit_params);
- ~NavigationRequest();
+ ~NavigationRequest() override;
// Called on the UI thread by the RenderFrameHostManager which owns the
// NavigationRequest. Takes ownership of |info|. After calling this function,
@@ -41,9 +43,17 @@ class CONTENT_EXPORT NavigationRequest {
const CommitNavigationParams& commit_params() const { return commit_params_; }
- NavigationRequestInfo* info_for_test() const { return info_.get(); }
+ NavigationURLLoader* loader_for_testing() const { return loader_.get(); }
private:
+ // NavigationURLLoaderDelegate implementation.
+ void OnRequestRedirected(
+ const net::RedirectInfo& redirect_info,
+ const scoped_refptr<ResourceResponse>& response) override;
+ void OnResponseStarted(const scoped_refptr<ResourceResponse>& response,
+ scoped_ptr<StreamHandle> body) override;
+ void OnRequestFailed(int net_error) override;
+
FrameTreeNode* frame_tree_node_;
// Initialized on creation of the NavigationRequest. Sent to the renderer when
@@ -54,8 +64,7 @@ class CONTENT_EXPORT NavigationRequest {
CommonNavigationParams common_params_;
const CommitNavigationParams commit_params_;
- // Initialized when beginning the navigation.
- scoped_ptr<NavigationRequestInfo> info_;
+ scoped_ptr<NavigationURLLoader> loader_;
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