| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/browser/loader/resource_handler.h" | 9 #include "content/browser/loader/resource_handler.h" |
| 10 #include "content/browser/loader/stream_writer.h" | 10 #include "content/browser/loader/stream_writer.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // Called to proceed with the response. | 32 // Called to proceed with the response. |
| 33 void ProceedWithResponse(); | 33 void ProceedWithResponse(); |
| 34 | 34 |
| 35 // ResourceHandler implementation. | 35 // ResourceHandler implementation. |
| 36 void SetController(ResourceController* controller) override; | 36 void SetController(ResourceController* controller) override; |
| 37 bool OnRequestRedirected(const net::RedirectInfo& redirect_info, | 37 bool OnRequestRedirected(const net::RedirectInfo& redirect_info, |
| 38 ResourceResponse* response, | 38 ResourceResponse* response, |
| 39 bool* defer) override; | 39 bool* defer) override; |
| 40 bool OnResponseStarted(ResourceResponse* response, bool* defer) override; | 40 bool OnResponseStarted(ResourceResponse* response, bool* defer) override; |
| 41 bool OnWillStart(const GURL& url, bool* defer) override; | 41 bool OnWillStart(const GURL& url, bool* defer) override; |
| 42 bool OnBeforeNetworkStart(const GURL& url, bool* defer) override; | |
| 43 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, | 42 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
| 44 int* buf_size, | 43 int* buf_size, |
| 45 int min_size) override; | 44 int min_size) override; |
| 46 bool OnReadCompleted(int bytes_read, bool* defer) override; | 45 bool OnReadCompleted(int bytes_read, bool* defer) override; |
| 47 void OnResponseCompleted(const net::URLRequestStatus& status, | 46 void OnResponseCompleted(const net::URLRequestStatus& status, |
| 48 const std::string& security_info, | 47 const std::string& security_info, |
| 49 bool* defer) override; | 48 bool* defer) override; |
| 50 void OnDataDownloaded(int bytes_downloaded) override; | 49 void OnDataDownloaded(int bytes_downloaded) override; |
| 51 | 50 |
| 52 private: | 51 private: |
| 53 // Clears |core_| and its reference to the resource handler. After calling | 52 // Clears |core_| and its reference to the resource handler. After calling |
| 54 // this, the lifetime of the request is no longer tied to |core_|. | 53 // this, the lifetime of the request is no longer tied to |core_|. |
| 55 void DetachFromCore(); | 54 void DetachFromCore(); |
| 56 | 55 |
| 57 NavigationURLLoaderImplCore* core_; | 56 NavigationURLLoaderImplCore* core_; |
| 58 StreamWriter writer_; | 57 StreamWriter writer_; |
| 59 ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate_; | 58 ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate_; |
| 60 | 59 |
| 61 DISALLOW_COPY_AND_ASSIGN(NavigationResourceHandler); | 60 DISALLOW_COPY_AND_ASSIGN(NavigationResourceHandler); |
| 62 }; | 61 }; |
| 63 | 62 |
| 64 } // namespace content | 63 } // namespace content |
| 65 | 64 |
| 66 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ | 65 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ |
| OLD | NEW |