| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 } | 146 } |
| 149 void set_waiting_for_upload_progress_ack(bool waiting) { | 147 void set_waiting_for_upload_progress_ack(bool waiting) { |
| 150 waiting_for_upload_progress_ack_ = waiting; | 148 waiting_for_upload_progress_ack_ = waiting; |
| 151 } | 149 } |
| 152 | 150 |
| 153 // The approximate in-memory size (bytes) that we credited this request | 151 // The approximate in-memory size (bytes) that we credited this request |
| 154 // as consuming in |outstanding_requests_memory_cost_map_|. | 152 // as consuming in |outstanding_requests_memory_cost_map_|. |
| 155 int memory_cost() const { return memory_cost_; } | 153 int memory_cost() const { return memory_cost_; } |
| 156 void set_memory_cost(int cost) { memory_cost_ = cost; } | 154 void set_memory_cost(int cost) { memory_cost_ = cost; } |
| 157 | 155 |
| 158 int host_renderer_id() const { return host_renderer_id_; } | |
| 159 int host_render_view_id() const { return host_render_view_id_; } | |
| 160 | |
| 161 // We hold a reference to the requested blob data to ensure it doesn't | 156 // We hold a reference to the requested blob data to ensure it doesn't |
| 162 // get finally released prior to the net::URLRequestJob being started. | 157 // get finally released prior to the net::URLRequestJob being started. |
| 163 webkit_blob::BlobData* requested_blob_data() const { | 158 webkit_blob::BlobData* requested_blob_data() const { |
| 164 return requested_blob_data_.get(); | 159 return requested_blob_data_.get(); |
| 165 } | 160 } |
| 166 void set_requested_blob_data(webkit_blob::BlobData* data); | 161 void set_requested_blob_data(webkit_blob::BlobData* data); |
| 167 | 162 |
| 168 private: | 163 private: |
| 169 friend class ResourceDispatcherHost; | 164 friend class ResourceDispatcherHost; |
| 170 | 165 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 int memory_cost_; | 215 int memory_cost_; |
| 221 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; | 216 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; |
| 222 | 217 |
| 223 // "Private" data accessible only to ResourceDispatcherHost (use the | 218 // "Private" data accessible only to ResourceDispatcherHost (use the |
| 224 // accessors above for consistency). | 219 // accessors above for consistency). |
| 225 bool is_paused_; | 220 bool is_paused_; |
| 226 bool called_on_response_started_; | 221 bool called_on_response_started_; |
| 227 bool has_started_reading_; | 222 bool has_started_reading_; |
| 228 int paused_read_bytes_; | 223 int paused_read_bytes_; |
| 229 | 224 |
| 230 // The following two members are specified if the request is initiated by | |
| 231 // a plugin like Gears. | |
| 232 | |
| 233 // Contains the id of the host renderer. | |
| 234 int host_renderer_id_; | |
| 235 // Contains the id of the host render view. | |
| 236 int host_render_view_id_; | |
| 237 | |
| 238 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); | 225 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); |
| 239 }; | 226 }; |
| 240 | 227 |
| 241 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H
_ | 228 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H
_ |
| OLD | NEW |