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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
15 | 15 |
16 namespace net { | 16 namespace net { |
17 class URLRequest; | 17 class URLRequest; |
18 } | 18 } |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
22 class DownloadItem; | |
23 class ResourceContext; | 22 class ResourceContext; |
24 class ResourceDispatcherHostDelegate; | 23 class ResourceDispatcherHostDelegate; |
25 struct DownloadSaveInfo; | |
26 struct Referrer; | |
27 class RenderFrameHost; | 24 class RenderFrameHost; |
28 | 25 |
29 // This callback is invoked when the interceptor finishes processing the | 26 // This callback is invoked when the interceptor finishes processing the |
30 // header. | 27 // header. |
31 // Parameter 1 is a bool indicating success or failure. | 28 // Parameter 1 is a bool indicating success or failure. |
32 // Parameter 2 contains the error code in case of failure, else 0. | 29 // Parameter 2 contains the error code in case of failure, else 0. |
33 typedef base::Callback<void(bool, int)> OnHeaderProcessedCallback; | 30 typedef base::Callback<void(bool, int)> OnHeaderProcessedCallback; |
34 | 31 |
35 // This callback is registered by interceptors who are interested in being | 32 // This callback is registered by interceptors who are interested in being |
36 // notified of certain HTTP headers in outgoing requests. For e.g. Origin. | 33 // notified of certain HTTP headers in outgoing requests. For e.g. Origin. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 const std::string& starts_with, | 81 const std::string& starts_with, |
85 const InterceptorCallback& interceptor) = 0; | 82 const InterceptorCallback& interceptor) = 0; |
86 | 83 |
87 protected: | 84 protected: |
88 virtual ~ResourceDispatcherHost() {} | 85 virtual ~ResourceDispatcherHost() {} |
89 }; | 86 }; |
90 | 87 |
91 } // namespace content | 88 } // namespace content |
92 | 89 |
93 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ | 90 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ |
OLD | NEW |