| 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 #include "content/browser/renderer_host/resource_request_info_impl.h" | 5 #include "content/browser/renderer_host/resource_request_info_impl.h" |
| 6 | 6 |
| 7 #include "content/browser/worker_host/worker_service_impl.h" | 7 #include "content/browser/worker_host/worker_service_impl.h" |
| 8 #include "content/common/net/url_request_user_data.h" | 8 #include "content/common/net/url_request_user_data.h" |
| 9 #include "content/public/browser/global_request_id.h" | 9 #include "content/public/browser/global_request_id.h" |
| 10 #include "net/url_request/url_request.h" | 10 #include "net/url_request/url_request.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 route_id_(route_id), | 104 route_id_(route_id), |
| 105 origin_pid_(origin_pid), | 105 origin_pid_(origin_pid), |
| 106 request_id_(request_id), | 106 request_id_(request_id), |
| 107 is_main_frame_(is_main_frame), | 107 is_main_frame_(is_main_frame), |
| 108 frame_id_(frame_id), | 108 frame_id_(frame_id), |
| 109 parent_is_main_frame_(parent_is_main_frame), | 109 parent_is_main_frame_(parent_is_main_frame), |
| 110 parent_frame_id_(parent_frame_id), | 110 parent_frame_id_(parent_frame_id), |
| 111 is_download_(is_download), | 111 is_download_(is_download), |
| 112 allow_download_(allow_download), | 112 allow_download_(allow_download), |
| 113 has_user_gesture_(has_user_gesture), | 113 has_user_gesture_(has_user_gesture), |
| 114 was_ignored_by_handler_(false), |
| 114 resource_type_(resource_type), | 115 resource_type_(resource_type), |
| 115 transition_type_(transition_type), | 116 transition_type_(transition_type), |
| 116 upload_size_(upload_size), | 117 upload_size_(upload_size), |
| 117 memory_cost_(0), | 118 memory_cost_(0), |
| 118 referrer_policy_(referrer_policy), | 119 referrer_policy_(referrer_policy), |
| 119 context_(context) { | 120 context_(context) { |
| 120 } | 121 } |
| 121 | 122 |
| 122 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() { | 123 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() { |
| 123 } | 124 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 } | 168 } |
| 168 | 169 |
| 169 uint64 ResourceRequestInfoImpl::GetUploadSize() const { | 170 uint64 ResourceRequestInfoImpl::GetUploadSize() const { |
| 170 return upload_size_; | 171 return upload_size_; |
| 171 } | 172 } |
| 172 | 173 |
| 173 bool ResourceRequestInfoImpl::HasUserGesture() const { | 174 bool ResourceRequestInfoImpl::HasUserGesture() const { |
| 174 return has_user_gesture_; | 175 return has_user_gesture_; |
| 175 } | 176 } |
| 176 | 177 |
| 178 bool ResourceRequestInfoImpl::WasIgnoredByHandler() const { |
| 179 return was_ignored_by_handler_; |
| 180 } |
| 181 |
| 177 bool ResourceRequestInfoImpl::GetAssociatedRenderView( | 182 bool ResourceRequestInfoImpl::GetAssociatedRenderView( |
| 178 int* render_process_id, | 183 int* render_process_id, |
| 179 int* render_view_id) const { | 184 int* render_view_id) const { |
| 180 // If the request is from the worker process, find a content that owns the | 185 // If the request is from the worker process, find a content that owns the |
| 181 // worker. | 186 // worker. |
| 182 if (process_type_ == PROCESS_TYPE_WORKER) { | 187 if (process_type_ == PROCESS_TYPE_WORKER) { |
| 183 // Need to display some related UI for this network request - pick an | 188 // Need to display some related UI for this network request - pick an |
| 184 // arbitrary parent to do so. | 189 // arbitrary parent to do so. |
| 185 if (!WorkerServiceImpl::GetInstance()->GetRendererForWorker( | 190 if (!WorkerServiceImpl::GetInstance()->GetRendererForWorker( |
| 186 child_id_, render_process_id, render_view_id)) { | 191 child_id_, render_process_id, render_view_id)) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 209 GlobalRequestID ResourceRequestInfoImpl::GetGlobalRequestID() const { | 214 GlobalRequestID ResourceRequestInfoImpl::GetGlobalRequestID() const { |
| 210 return GlobalRequestID(child_id_, request_id_); | 215 return GlobalRequestID(child_id_, request_id_); |
| 211 } | 216 } |
| 212 | 217 |
| 213 void ResourceRequestInfoImpl::set_requested_blob_data( | 218 void ResourceRequestInfoImpl::set_requested_blob_data( |
| 214 webkit_blob::BlobData* data) { | 219 webkit_blob::BlobData* data) { |
| 215 requested_blob_data_ = data; | 220 requested_blob_data_ = data; |
| 216 } | 221 } |
| 217 | 222 |
| 218 } // namespace content | 223 } // namespace content |
| OLD | NEW |