| 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" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 class CertStore; |
| 14 class NavigationURLLoaderImplCore; | 14 class NavigationURLLoaderImplCore; |
| 15 class ResourceDispatcherHostDelegate; | 15 class ResourceDispatcherHostDelegate; |
| 16 | 16 |
| 17 // PlzNavigate: The leaf ResourceHandler used with NavigationURLLoaderImplCore. | 17 // PlzNavigate: The leaf ResourceHandler used with NavigationURLLoaderImplCore. |
| 18 class NavigationResourceHandler : public ResourceHandler { | 18 class NavigationResourceHandler : public ResourceHandler { |
| 19 public: | 19 public: |
| 20 NavigationResourceHandler( | 20 NavigationResourceHandler( |
| 21 net::URLRequest* request, | 21 net::URLRequest* request, |
| 22 NavigationURLLoaderImplCore* core, | 22 NavigationURLLoaderImplCore* core, |
| 23 ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate); | 23 ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate, |
| 24 CertStore* cert_store); |
| 24 ~NavigationResourceHandler() override; | 25 ~NavigationResourceHandler() override; |
| 25 | 26 |
| 26 // Called by the loader the cancel the request. | 27 // Called by the loader the cancel the request. |
| 27 void Cancel(); | 28 void Cancel(); |
| 28 | 29 |
| 29 // Called to the loader to resume a paused redirect. | 30 // Called to the loader to resume a paused redirect. |
| 30 void FollowRedirect(); | 31 void FollowRedirect(); |
| 31 | 32 |
| 32 // Called to proceed with the response. | 33 // Called to proceed with the response. |
| 33 void ProceedWithResponse(); | 34 void ProceedWithResponse(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 49 void OnDataDownloaded(int bytes_downloaded) override; | 50 void OnDataDownloaded(int bytes_downloaded) override; |
| 50 | 51 |
| 51 private: | 52 private: |
| 52 // Clears |core_| and its reference to the resource handler. After calling | 53 // Clears |core_| and its reference to the resource handler. After calling |
| 53 // this, the lifetime of the request is no longer tied to |core_|. | 54 // this, the lifetime of the request is no longer tied to |core_|. |
| 54 void DetachFromCore(); | 55 void DetachFromCore(); |
| 55 | 56 |
| 56 NavigationURLLoaderImplCore* core_; | 57 NavigationURLLoaderImplCore* core_; |
| 57 StreamWriter writer_; | 58 StreamWriter writer_; |
| 58 ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate_; | 59 ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate_; |
| 60 CertStore* cert_store_; |
| 59 | 61 |
| 60 DISALLOW_COPY_AND_ASSIGN(NavigationResourceHandler); | 62 DISALLOW_COPY_AND_ASSIGN(NavigationResourceHandler); |
| 61 }; | 63 }; |
| 62 | 64 |
| 63 } // namespace content | 65 } // namespace content |
| 64 | 66 |
| 65 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ | 67 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ |
| OLD | NEW |