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); |
}; |