OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_REQUEST_INFO_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 ResourceDispatcherHostRequestInfo( | 33 ResourceDispatcherHostRequestInfo( |
34 ResourceHandler* handler, | 34 ResourceHandler* handler, |
35 ChildProcessInfo::ProcessType process_type, | 35 ChildProcessInfo::ProcessType process_type, |
36 int child_id, | 36 int child_id, |
37 int route_id, | 37 int route_id, |
38 int request_id, | 38 int request_id, |
39 ResourceType::Type resource_type, | 39 ResourceType::Type resource_type, |
40 uint64 upload_size, | 40 uint64 upload_size, |
41 bool is_download, | 41 bool is_download, |
42 bool allow_download, | 42 bool allow_download, |
43 bool has_user_gesture, | 43 bool has_user_gesture); |
44 int host_renderer_id, | |
45 int host_render_view_id); | |
46 virtual ~ResourceDispatcherHostRequestInfo(); | 44 virtual ~ResourceDispatcherHostRequestInfo(); |
47 | 45 |
48 // Top-level ResourceHandler servicing this request. | 46 // Top-level ResourceHandler servicing this request. |
49 ResourceHandler* resource_handler() { return resource_handler_.get(); } | 47 ResourceHandler* resource_handler() { return resource_handler_.get(); } |
50 | 48 |
51 // CrossSiteResourceHandler for this request, if it is a cross-site request. | 49 // CrossSiteResourceHandler for this request, if it is a cross-site request. |
52 // (NULL otherwise.) This handler is part of the chain of ResourceHandlers | 50 // (NULL otherwise.) This handler is part of the chain of ResourceHandlers |
53 // pointed to by resource_handler, and is not owned by this class. | 51 // pointed to by resource_handler, and is not owned by this class. |
54 CrossSiteResourceHandler* cross_site_handler() { | 52 CrossSiteResourceHandler* cross_site_handler() { |
55 return cross_site_handler_; | 53 return cross_site_handler_; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 } | 136 } |
139 void set_waiting_for_upload_progress_ack(bool waiting) { | 137 void set_waiting_for_upload_progress_ack(bool waiting) { |
140 waiting_for_upload_progress_ack_ = waiting; | 138 waiting_for_upload_progress_ack_ = waiting; |
141 } | 139 } |
142 | 140 |
143 // The approximate in-memory size (bytes) that we credited this request | 141 // The approximate in-memory size (bytes) that we credited this request |
144 // as consuming in |outstanding_requests_memory_cost_map_|. | 142 // as consuming in |outstanding_requests_memory_cost_map_|. |
145 int memory_cost() const { return memory_cost_; } | 143 int memory_cost() const { return memory_cost_; } |
146 void set_memory_cost(int cost) { memory_cost_ = cost; } | 144 void set_memory_cost(int cost) { memory_cost_ = cost; } |
147 | 145 |
148 int host_renderer_id() const { return host_renderer_id_; } | |
149 int host_render_view_id() const { return host_render_view_id_; } | |
150 | |
151 // We hold a reference to the requested blob data to ensure it doesn't | 146 // We hold a reference to the requested blob data to ensure it doesn't |
152 // get finally released prior to the net::URLRequestJob being started. | 147 // get finally released prior to the net::URLRequestJob being started. |
153 webkit_blob::BlobData* requested_blob_data() const { | 148 webkit_blob::BlobData* requested_blob_data() const { |
154 return requested_blob_data_.get(); | 149 return requested_blob_data_.get(); |
155 } | 150 } |
156 void set_requested_blob_data(webkit_blob::BlobData* data); | 151 void set_requested_blob_data(webkit_blob::BlobData* data); |
157 | 152 |
158 private: | 153 private: |
159 friend class ResourceDispatcherHost; | 154 friend class ResourceDispatcherHost; |
160 | 155 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 int memory_cost_; | 204 int memory_cost_; |
210 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; | 205 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; |
211 | 206 |
212 // "Private" data accessible only to ResourceDispatcherHost (use the | 207 // "Private" data accessible only to ResourceDispatcherHost (use the |
213 // accessors above for consistency). | 208 // accessors above for consistency). |
214 bool is_paused_; | 209 bool is_paused_; |
215 bool called_on_response_started_; | 210 bool called_on_response_started_; |
216 bool has_started_reading_; | 211 bool has_started_reading_; |
217 int paused_read_bytes_; | 212 int paused_read_bytes_; |
218 | 213 |
219 // The following two members are specified if the request is initiated by | |
220 // a plugin like Gears. | |
221 | |
222 // Contains the id of the host renderer. | |
223 int host_renderer_id_; | |
224 // Contains the id of the host render view. | |
225 int host_render_view_id_; | |
226 | |
227 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); | 214 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); |
228 }; | 215 }; |
229 | 216 |
230 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H
_ | 217 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H
_ |
OLD | NEW |