| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. | 5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. |
| 6 | 6 |
| 7 #include "webkit/glue/weburlloader_impl.h" | 7 #include "webkit/glue/weburlloader_impl.h" |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 request_info.referrer = referrer_url; | 394 request_info.referrer = referrer_url; |
| 395 request_info.headers = flattener.GetBuffer(); | 395 request_info.headers = flattener.GetBuffer(); |
| 396 request_info.load_flags = load_flags; | 396 request_info.load_flags = load_flags; |
| 397 // requestor_pid only needs to be non-zero if the request originates outside | 397 // requestor_pid only needs to be non-zero if the request originates outside |
| 398 // the render process, so we can use requestorProcessID even for requests | 398 // the render process, so we can use requestorProcessID even for requests |
| 399 // from in-process plugins. | 399 // from in-process plugins. |
| 400 request_info.requestor_pid = request.requestorProcessID(); | 400 request_info.requestor_pid = request.requestorProcessID(); |
| 401 request_info.request_type = | 401 request_info.request_type = |
| 402 ResourceType::FromTargetType(request.targetType()); | 402 ResourceType::FromTargetType(request.targetType()); |
| 403 request_info.appcache_host_id = request.appCacheHostID(); | 403 request_info.appcache_host_id = request.appCacheHostID(); |
| 404 request_info.identifier = request.identifier(); |
| 404 request_info.routing_id = request.requestorID(); | 405 request_info.routing_id = request.requestorID(); |
| 405 request_info.download_to_file = request.downloadToFile(); | 406 request_info.download_to_file = request.downloadToFile(); |
| 406 request_info.has_user_gesture = request.hasUserGesture(); | 407 request_info.has_user_gesture = request.hasUserGesture(); |
| 407 request_info.frame_id = -1; | 408 request_info.frame_id = -1; |
| 408 request_info.is_main_frame = false; | 409 request_info.is_main_frame = false; |
| 409 if (request.extraData()) { | 410 if (request.extraData()) { |
| 410 RequestExtraData* extra_data = | 411 RequestExtraData* extra_data = |
| 411 static_cast<RequestExtraData*>(request.extraData()); | 412 static_cast<RequestExtraData*>(request.extraData()); |
| 412 request_info.frame_id = extra_data->frame_identifier(); | 413 request_info.frame_id = extra_data->frame_identifier(); |
| 413 request_info.is_main_frame = extra_data->is_main_frame(); | 414 request_info.is_main_frame = extra_data->is_main_frame(); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 | 722 |
| 722 void WebURLLoaderImpl::cancel() { | 723 void WebURLLoaderImpl::cancel() { |
| 723 context_->Cancel(); | 724 context_->Cancel(); |
| 724 } | 725 } |
| 725 | 726 |
| 726 void WebURLLoaderImpl::setDefersLoading(bool value) { | 727 void WebURLLoaderImpl::setDefersLoading(bool value) { |
| 727 context_->SetDefersLoading(value); | 728 context_->SetDefersLoading(value); |
| 728 } | 729 } |
| 729 | 730 |
| 730 } // namespace webkit_glue | 731 } // namespace webkit_glue |
| OLD | NEW |