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