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_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "content/public/browser/download_id.h" | 9 #include "content/public/browser/download_id.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // will be returned. |is_content_initiated| is used to indicate that | 39 // will be returned. |is_content_initiated| is used to indicate that |
40 // the request was generated from a web page, and hence may not be | 40 // the request was generated from a web page, and hence may not be |
41 // as trustworthy as a browser generated request. | 41 // as trustworthy as a browser generated request. |
42 virtual net::Error BeginDownload( | 42 virtual net::Error BeginDownload( |
43 scoped_ptr<net::URLRequest> request, | 43 scoped_ptr<net::URLRequest> request, |
44 bool is_content_initiated, | 44 bool is_content_initiated, |
45 ResourceContext* context, | 45 ResourceContext* context, |
46 int child_id, | 46 int child_id, |
47 int route_id, | 47 int route_id, |
48 bool prefer_cache, | 48 bool prefer_cache, |
49 const DownloadSaveInfo& save_info, | 49 scoped_ptr<DownloadSaveInfo> save_info, |
50 const DownloadStartedCallback& started_callback) = 0; | 50 const DownloadStartedCallback& started_callback) = 0; |
51 | 51 |
52 // Clears the ResourceDispatcherHostLoginDelegate associated with the request. | 52 // Clears the ResourceDispatcherHostLoginDelegate associated with the request. |
53 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0; | 53 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0; |
54 | 54 |
55 // Causes all new requests for the route identified by |child_id| and | 55 // Causes all new requests for the route identified by |child_id| and |
56 // |route_id| to be blocked (not being started) until | 56 // |route_id| to be blocked (not being started) until |
57 // ResumeBlockedRequestsForRoute is called. | 57 // ResumeBlockedRequestsForRoute is called. |
58 virtual void BlockRequestsForRoute(int child_id, int route_id) = 0; | 58 virtual void BlockRequestsForRoute(int child_id, int route_id) = 0; |
59 | 59 |
60 // Resumes any blocked request for the specified route id. | 60 // Resumes any blocked request for the specified route id. |
61 virtual void ResumeBlockedRequestsForRoute(int child_id, int route_id) = 0; | 61 virtual void ResumeBlockedRequestsForRoute(int child_id, int route_id) = 0; |
62 | 62 |
63 protected: | 63 protected: |
64 virtual ~ResourceDispatcherHost() {} | 64 virtual ~ResourceDispatcherHost() {} |
65 }; | 65 }; |
66 | 66 |
67 } // namespace content | 67 } // namespace content |
68 | 68 |
69 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ | 69 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ |
OLD | NEW |