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_REQUEST_INFO_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/common/resource_type.h" | 10 #include "content/public/common/resource_type.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 // Allocates a new, dummy ResourceRequestInfo and associates it with the | 30 // Allocates a new, dummy ResourceRequestInfo and associates it with the |
31 // given URLRequest. | 31 // given URLRequest. |
32 // NOTE: Add more parameters if you need to initialize other fields. | 32 // NOTE: Add more parameters if you need to initialize other fields. |
33 CONTENT_EXPORT static void AllocateForTesting(net::URLRequest* request, | 33 CONTENT_EXPORT static void AllocateForTesting(net::URLRequest* request, |
34 ResourceType resource_type, | 34 ResourceType resource_type, |
35 ResourceContext* context, | 35 ResourceContext* context, |
36 int render_process_id, | 36 int render_process_id, |
37 int render_view_id, | 37 int render_view_id, |
38 int render_frame_id, | 38 int render_frame_id, |
| 39 bool allow_download, |
39 bool is_async); | 40 bool is_async); |
40 | 41 |
41 // Returns the associated RenderFrame for a given process. Returns false, if | 42 // Returns the associated RenderFrame for a given process. Returns false, if |
42 // there is no associated RenderFrame. This method does not rely on the | 43 // there is no associated RenderFrame. This method does not rely on the |
43 // request being allocated by the ResourceDispatcherHost, but works for all | 44 // request being allocated by the ResourceDispatcherHost, but works for all |
44 // URLRequests that are associated with a RenderFrame. | 45 // URLRequests that are associated with a RenderFrame. |
45 CONTENT_EXPORT static bool GetRenderFrameForRequest( | 46 CONTENT_EXPORT static bool GetRenderFrameForRequest( |
46 const net::URLRequest* request, | 47 const net::URLRequest* request, |
47 int* render_process_id, | 48 int* render_process_id, |
48 int* render_frame_id); | 49 int* render_frame_id); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // Whether this is a download. | 122 // Whether this is a download. |
122 virtual bool IsDownload() const = 0; | 123 virtual bool IsDownload() const = 0; |
123 | 124 |
124 protected: | 125 protected: |
125 virtual ~ResourceRequestInfo() {} | 126 virtual ~ResourceRequestInfo() {} |
126 }; | 127 }; |
127 | 128 |
128 } // namespace content | 129 } // namespace content |
129 | 130 |
130 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ | 131 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ |
OLD | NEW |