| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 | 12 |
| 13 class GURL; | 13 class GURL; |
| 14 class ResourceDispatcherHostLoginDelegate; | 14 class ResourceDispatcherHostLoginDelegate; |
| 15 class ResourceHandler; | 15 class ResourceHandler; |
| 16 class ResourceMessageFilter; | 16 class ResourceMessageFilter; |
| 17 class TabContents; |
| 17 struct ResourceHostMsg_Request; | 18 struct ResourceHostMsg_Request; |
| 18 struct ResourceResponse; | 19 struct ResourceResponse; |
| 19 | 20 |
| 20 namespace content { | 21 namespace content { |
| 21 class ResourceContext; | 22 class ResourceContext; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace net { | 25 namespace net { |
| 25 class AuthChallengeInfo; | 26 class AuthChallengeInfo; |
| 26 class SSLCertRequestInfo; | 27 class SSLCertRequestInfo; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 43 // a new handler that is chained to the given one, otherwise just reutrn the | 44 // a new handler that is chained to the given one, otherwise just reutrn the |
| 44 // given handler. | 45 // given handler. |
| 45 virtual ResourceHandler* RequestBeginning( | 46 virtual ResourceHandler* RequestBeginning( |
| 46 ResourceHandler* handler, | 47 ResourceHandler* handler, |
| 47 net::URLRequest* request, | 48 net::URLRequest* request, |
| 48 const content::ResourceContext& resource_context, | 49 const content::ResourceContext& resource_context, |
| 49 bool is_subresource, | 50 bool is_subresource, |
| 50 int child_id, | 51 int child_id, |
| 51 int route_id) = 0; | 52 int route_id) = 0; |
| 52 | 53 |
| 53 // Called when a download is starting, after the resource handles from the | 54 // Allows an embedder to add additional resource handlers for a download. |
| 54 // content layer have been added. | 55 // |is_new_request| is true if this is a request that is just starting, i.e. |
| 56 // the content layer has just added its own resource handlers; it's false if |
| 57 // this was originally a non-download request that had some resource handlers |
| 58 // applied already and now we found out it's a download. |
| 59 // |in_complete| is true if this is invoked from |OnResponseCompleted|. |
| 55 virtual ResourceHandler* DownloadStarting( | 60 virtual ResourceHandler* DownloadStarting( |
| 56 ResourceHandler* handler, | 61 ResourceHandler* handler, |
| 57 const content::ResourceContext& resource_context, | 62 const content::ResourceContext& resource_context, |
| 63 net::URLRequest* request, |
| 58 int child_id, | 64 int child_id, |
| 59 int route_id) = 0; | 65 int route_id, |
| 66 int request_id, |
| 67 bool is_new_request, |
| 68 bool in_complete) = 0; |
| 60 | 69 |
| 61 // Called to determine whether a request's start should be deferred. This | 70 // Called to determine whether a request's start should be deferred. This |
| 62 // is only called if the ResourceHandler associated with the request does | 71 // is only called if the ResourceHandler associated with the request does |
| 63 // not ask for a deferral. A return value of true will defer the start of | 72 // not ask for a deferral. A return value of true will defer the start of |
| 64 // the request, false will continue the request. | 73 // the request, false will continue the request. |
| 65 virtual bool ShouldDeferStart( | 74 virtual bool ShouldDeferStart( |
| 66 net::URLRequest* request, | 75 net::URLRequest* request, |
| 67 const content::ResourceContext& resource_context) = 0; | 76 const content::ResourceContext& resource_context) = 0; |
| 68 | 77 |
| 69 // Called when an SSL Client Certificate is requested. If false is returned, | 78 // Called when an SSL Client Certificate is requested. If false is returned, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 net::URLRequest* request, | 114 net::URLRequest* request, |
| 106 ResourceResponse* response, | 115 ResourceResponse* response, |
| 107 ResourceMessageFilter* filter) = 0; | 116 ResourceMessageFilter* filter) = 0; |
| 108 | 117 |
| 109 protected: | 118 protected: |
| 110 ResourceDispatcherHostDelegate() {} | 119 ResourceDispatcherHostDelegate() {} |
| 111 virtual ~ResourceDispatcherHostDelegate() {} | 120 virtual ~ResourceDispatcherHostDelegate() {} |
| 112 }; | 121 }; |
| 113 | 122 |
| 114 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 123 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| OLD | NEW |