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

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, OVERRIDE -> override, NULL -> nullptr 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
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..f372fcc8a49996d10305cf0e50716bab23d971ea 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/loader/navigation_url_loader.h"
#include "content/common/content_export.h"
#include "content/common/navigation_params.h"
@@ -23,13 +24,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 NavigationURLLoader::Delegate {
public:
NavigationRequest(FrameTreeNode* frame_tree_node,
const CommonNavigationParams& common_params,
const CommitNavigationParams& commit_params);
- ~NavigationRequest();
+ virtual ~NavigationRequest();
// Called on the UI thread by the RenderFrameHostManager which owns the
// NavigationRequest. Takes ownership of |info|. After calling this function,
@@ -41,9 +42,16 @@ 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:
+ // NavigationURLLoader::Delegate implementation.
+ virtual void OnRequestRedirected(const net::RedirectInfo& redirect_info,
+ ResourceResponse* response) override;
+ virtual void OnResponseStarted(ResourceResponse* response,
+ scoped_ptr<StreamHandle> body) override;
+ virtual void OnRequestFailed(int net_error) override;
+
FrameTreeNode* frame_tree_node_;
// Initialized on creation of the NavigationRequest. Sent to the renderer when
@@ -54,8 +62,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') | content/browser/loader/navigation_resource_handler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698