OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RESOURCE_LOADER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ |
6 #define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ | 6 #define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "base/timer/timer.h" | 11 #include "base/timer/timer.h" |
12 #include "content/browser/loader/resource_handler.h" | 12 #include "content/browser/loader/resource_handler.h" |
13 #include "content/browser/ssl/ssl_client_auth_handler.h" | 13 #include "content/browser/ssl/ssl_client_auth_handler.h" |
14 #include "content/browser/ssl/ssl_error_handler.h" | 14 #include "content/browser/ssl/ssl_error_handler.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "content/public/browser/resource_controller.h" | 16 #include "content/public/browser/resource_controller.h" |
17 #include "content/public/common/signed_certificate_timestamp_id_and_status.h" | 17 #include "content/public/common/signed_certificate_timestamp_id_and_status.h" |
18 #include "net/url_request/url_request.h" | 18 #include "net/url_request/url_request.h" |
19 | 19 |
20 namespace net { | 20 namespace net { |
| 21 class SSLPrivateKey; |
21 class X509Certificate; | 22 class X509Certificate; |
22 } | 23 } |
23 | 24 |
24 namespace content { | 25 namespace content { |
25 class ResourceDispatcherHostLoginDelegate; | 26 class ResourceDispatcherHostLoginDelegate; |
26 class ResourceLoaderDelegate; | 27 class ResourceLoaderDelegate; |
27 class ResourceRequestInfoImpl; | 28 class ResourceRequestInfoImpl; |
28 | 29 |
29 // This class is responsible for driving the URLRequest (i.e., calling Start, | 30 // This class is responsible for driving the URLRequest (i.e., calling Start, |
30 // Read, and servicing events). It has a ResourceHandler, which is typically a | 31 // Read, and servicing events). It has a ResourceHandler, which is typically a |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 bool fatal) override; | 66 bool fatal) override; |
66 void OnBeforeNetworkStart(net::URLRequest* request, bool* defer) override; | 67 void OnBeforeNetworkStart(net::URLRequest* request, bool* defer) override; |
67 void OnResponseStarted(net::URLRequest* request) override; | 68 void OnResponseStarted(net::URLRequest* request) override; |
68 void OnReadCompleted(net::URLRequest* request, int bytes_read) override; | 69 void OnReadCompleted(net::URLRequest* request, int bytes_read) override; |
69 | 70 |
70 // SSLErrorHandler::Delegate implementation: | 71 // SSLErrorHandler::Delegate implementation: |
71 void CancelSSLRequest(int error, const net::SSLInfo* ssl_info) override; | 72 void CancelSSLRequest(int error, const net::SSLInfo* ssl_info) override; |
72 void ContinueSSLRequest() override; | 73 void ContinueSSLRequest() override; |
73 | 74 |
74 // SSLClientAuthHandler::Delegate implementation. | 75 // SSLClientAuthHandler::Delegate implementation. |
75 void ContinueWithCertificate(net::X509Certificate* cert) override; | 76 void ContinueWithCertificate(net::X509Certificate* cert, |
| 77 net::SSLPrivateKey* private_key) override; |
76 void CancelCertificateSelection() override; | 78 void CancelCertificateSelection() override; |
77 | 79 |
78 // ResourceController implementation: | 80 // ResourceController implementation: |
79 void Resume() override; | 81 void Resume() override; |
80 void Cancel() override; | 82 void Cancel() override; |
81 void CancelAndIgnore() override; | 83 void CancelAndIgnore() override; |
82 void CancelWithError(int error_code) override; | 84 void CancelWithError(int error_code) override; |
83 | 85 |
84 void StartRequestInternal(); | 86 void StartRequestInternal(); |
85 void CancelRequestInternal(int error, bool from_renderer); | 87 void CancelRequestInternal(int error, bool from_renderer); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 int times_cancelled_after_request_start_; | 148 int times_cancelled_after_request_start_; |
147 | 149 |
148 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; | 150 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; |
149 | 151 |
150 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); | 152 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); |
151 }; | 153 }; |
152 | 154 |
153 } // namespace content | 155 } // namespace content |
154 | 156 |
155 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ | 157 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ |
OLD | NEW |