| 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 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 virtual bool ShouldBeginRequest( | 34 virtual bool ShouldBeginRequest( |
| 35 int child_id, int route_id, | 35 int child_id, int route_id, |
| 36 const ResourceHostMsg_Request& request_data, | 36 const ResourceHostMsg_Request& request_data, |
| 37 const content::ResourceContext& resource_context, | 37 const content::ResourceContext& resource_context, |
| 38 const GURL& referrer); | 38 const GURL& referrer); |
| 39 | 39 |
| 40 // Called after ShouldBeginRequest when all the resource handlers from the | 40 // Called after ShouldBeginRequest when all the resource handlers from the |
| 41 // content layer have been added. To add new handlers to the front, return | 41 // content layer have been added. To add new handlers to the front, return |
| 42 // a new handler that is chained to the given one, otherwise just reutrn the | 42 // a new handler that is chained to the given one, otherwise just reutrn the |
| 43 // given handler. | 43 // given handler. |
| 44 virtual ResourceHandler* RequestBeginning(ResourceHandler* handler, | 44 virtual ResourceHandler* RequestBeginning( |
| 45 net::URLRequest* request, | 45 ResourceHandler* handler, |
| 46 bool is_subresource, | 46 net::URLRequest* request, |
| 47 int child_id, | 47 const content::ResourceContext& resource_context, |
| 48 int route_id); | 48 bool is_subresource, |
| 49 int child_id, |
| 50 int route_id); |
| 49 | 51 |
| 50 // Called when a download is starting, after the resource handles from the | 52 // Called when a download is starting, after the resource handles from the |
| 51 // content layer have been added. | 53 // content layer have been added. |
| 52 virtual ResourceHandler* DownloadStarting(ResourceHandler* handler, | 54 virtual ResourceHandler* DownloadStarting( |
| 53 int child_id, | 55 ResourceHandler* handler, |
| 54 int route_id); | 56 const content::ResourceContext& resource_context, |
| 57 int child_id, |
| 58 int route_id); |
| 55 | 59 |
| 56 // Called to determine whether a request's start should be deferred. This | 60 // Called to determine whether a request's start should be deferred. This |
| 57 // is only called if the ResourceHandler associated with the request does | 61 // is only called if the ResourceHandler associated with the request does |
| 58 // not ask for a deferral. A return value of true will defer the start of | 62 // not ask for a deferral. A return value of true will defer the start of |
| 59 // the request, false will continue the request. | 63 // the request, false will continue the request. |
| 60 virtual bool ShouldDeferStart( | 64 virtual bool ShouldDeferStart( |
| 61 net::URLRequest* request, | 65 net::URLRequest* request, |
| 62 const content::ResourceContext& resource_context); | 66 const content::ResourceContext& resource_context); |
| 63 | 67 |
| 64 // Called when an SSL Client Certificate is requested. If false is returned, | 68 // Called when an SSL Client Certificate is requested. If false is returned, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // Informs the delegate that a request has been redirected. | 100 // Informs the delegate that a request has been redirected. |
| 97 virtual void OnRequestRedirected(net::URLRequest* request, | 101 virtual void OnRequestRedirected(net::URLRequest* request, |
| 98 ResourceResponse* response); | 102 ResourceResponse* response); |
| 99 | 103 |
| 100 protected: | 104 protected: |
| 101 ResourceDispatcherHostDelegate(); | 105 ResourceDispatcherHostDelegate(); |
| 102 virtual ~ResourceDispatcherHostDelegate(); | 106 virtual ~ResourceDispatcherHostDelegate(); |
| 103 }; | 107 }; |
| 104 | 108 |
| 105 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 109 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| OLD | NEW |