| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 } | 167 } |
| 168 | 168 |
| 169 uint64 ResourceRequestInfoImpl::GetUploadSize() const { | 169 uint64 ResourceRequestInfoImpl::GetUploadSize() const { |
| 170 return upload_size_; | 170 return upload_size_; |
| 171 } | 171 } |
| 172 | 172 |
| 173 bool ResourceRequestInfoImpl::HasUserGesture() const { | 173 bool ResourceRequestInfoImpl::HasUserGesture() const { |
| 174 return has_user_gesture_; | 174 return has_user_gesture_; |
| 175 } | 175 } |
| 176 | 176 |
| 177 bool ResourceRequestInfoImpl::HandledExternally() const { |
| 178 return handled_externally_; |
| 179 } |
| 180 |
| 177 bool ResourceRequestInfoImpl::GetAssociatedRenderView( | 181 bool ResourceRequestInfoImpl::GetAssociatedRenderView( |
| 178 int* render_process_id, | 182 int* render_process_id, |
| 179 int* render_view_id) const { | 183 int* render_view_id) const { |
| 180 // If the request is from the worker process, find a content that owns the | 184 // If the request is from the worker process, find a content that owns the |
| 181 // worker. | 185 // worker. |
| 182 if (process_type_ == PROCESS_TYPE_WORKER) { | 186 if (process_type_ == PROCESS_TYPE_WORKER) { |
| 183 // Need to display some related UI for this network request - pick an | 187 // Need to display some related UI for this network request - pick an |
| 184 // arbitrary parent to do so. | 188 // arbitrary parent to do so. |
| 185 if (!WorkerServiceImpl::GetInstance()->GetRendererForWorker( | 189 if (!WorkerServiceImpl::GetInstance()->GetRendererForWorker( |
| 186 child_id_, render_process_id, render_view_id)) { | 190 child_id_, render_process_id, render_view_id)) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 209 GlobalRequestID ResourceRequestInfoImpl::GetGlobalRequestID() const { | 213 GlobalRequestID ResourceRequestInfoImpl::GetGlobalRequestID() const { |
| 210 return GlobalRequestID(child_id_, request_id_); | 214 return GlobalRequestID(child_id_, request_id_); |
| 211 } | 215 } |
| 212 | 216 |
| 213 void ResourceRequestInfoImpl::set_requested_blob_data( | 217 void ResourceRequestInfoImpl::set_requested_blob_data( |
| 214 webkit_blob::BlobData* data) { | 218 webkit_blob::BlobData* data) { |
| 215 requested_blob_data_ = data; | 219 requested_blob_data_ = data; |
| 216 } | 220 } |
| 217 | 221 |
| 218 } // namespace content | 222 } // namespace content |
| OLD | NEW |