| 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_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_LOADER_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_DELEGATE_H_ | 6 #define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| 11 class AuthChallengeInfo; | 11 class AuthChallengeInfo; |
| 12 class SSLCertRequestInfo; | |
| 13 } | 12 } |
| 14 | 13 |
| 15 namespace content { | 14 namespace content { |
| 16 class ResourceDispatcherHostLoginDelegate; | 15 class ResourceDispatcherHostLoginDelegate; |
| 17 class ResourceLoader; | 16 class ResourceLoader; |
| 18 | 17 |
| 19 class CONTENT_EXPORT ResourceLoaderDelegate { | 18 class CONTENT_EXPORT ResourceLoaderDelegate { |
| 20 public: | 19 public: |
| 21 virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( | 20 virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( |
| 22 ResourceLoader* loader, | 21 ResourceLoader* loader, |
| 23 net::AuthChallengeInfo* auth_info) = 0; | 22 net::AuthChallengeInfo* auth_info) = 0; |
| 24 | 23 |
| 25 virtual bool AcceptAuthRequest(ResourceLoader* loader, | |
| 26 net::AuthChallengeInfo* auth_info) = 0; | |
| 27 virtual bool AcceptSSLClientCertificateRequest( | |
| 28 ResourceLoader* loader, | |
| 29 net::SSLCertRequestInfo* cert_info) = 0; | |
| 30 | |
| 31 virtual bool HandleExternalProtocol(ResourceLoader* loader, | 24 virtual bool HandleExternalProtocol(ResourceLoader* loader, |
| 32 const GURL& url) = 0; | 25 const GURL& url) = 0; |
| 33 | 26 |
| 34 virtual void DidStartRequest(ResourceLoader* loader) = 0; | 27 virtual void DidStartRequest(ResourceLoader* loader) = 0; |
| 35 virtual void DidReceiveRedirect(ResourceLoader* loader, | 28 virtual void DidReceiveRedirect(ResourceLoader* loader, |
| 36 const GURL& new_url) = 0; | 29 const GURL& new_url) = 0; |
| 37 virtual void DidReceiveResponse(ResourceLoader* loader) = 0; | 30 virtual void DidReceiveResponse(ResourceLoader* loader) = 0; |
| 38 | 31 |
| 39 // This method informs the delegate that the loader is done, and the loader | 32 // This method informs the delegate that the loader is done, and the loader |
| 40 // expects to be destroyed as a side-effect of this call. | 33 // expects to be destroyed as a side-effect of this call. |
| 41 virtual void DidFinishLoading(ResourceLoader* loader) = 0; | 34 virtual void DidFinishLoading(ResourceLoader* loader) = 0; |
| 42 | 35 |
| 43 protected: | 36 protected: |
| 44 virtual ~ResourceLoaderDelegate() {} | 37 virtual ~ResourceLoaderDelegate() {} |
| 45 }; | 38 }; |
| 46 | 39 |
| 47 } // namespace content | 40 } // namespace content |
| 48 | 41 |
| 49 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_DELEGATE_H_ | 42 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_DELEGATE_H_ |
| OLD | NEW |