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