| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 case WebURLRequest::TargetIsImage: | 125 case WebURLRequest::TargetIsImage: |
| 126 return ResourceType::IMAGE; | 126 return ResourceType::IMAGE; |
| 127 case WebURLRequest::TargetIsObject: | 127 case WebURLRequest::TargetIsObject: |
| 128 return ResourceType::OBJECT; | 128 return ResourceType::OBJECT; |
| 129 case WebURLRequest::TargetIsMedia: | 129 case WebURLRequest::TargetIsMedia: |
| 130 return ResourceType::MEDIA; | 130 return ResourceType::MEDIA; |
| 131 case WebURLRequest::TargetIsWorker: | 131 case WebURLRequest::TargetIsWorker: |
| 132 return ResourceType::WORKER; | 132 return ResourceType::WORKER; |
| 133 case WebURLRequest::TargetIsSharedWorker: | 133 case WebURLRequest::TargetIsSharedWorker: |
| 134 return ResourceType::SHARED_WORKER; | 134 return ResourceType::SHARED_WORKER; |
| 135 case WebURLRequest::TargetIsPrefetch: |
| 136 return ResourceType::PREFETCH; |
| 135 default: | 137 default: |
| 136 NOTREACHED(); | 138 NOTREACHED(); |
| 137 return ResourceType::SUB_RESOURCE; | 139 return ResourceType::SUB_RESOURCE; |
| 138 } | 140 } |
| 139 } | 141 } |
| 140 | 142 |
| 141 // Extracts the information from a data: url. | 143 // Extracts the information from a data: url. |
| 142 bool GetInfoFromDataURL(const GURL& url, | 144 bool GetInfoFromDataURL(const GURL& url, |
| 143 ResourceLoaderBridge::ResponseInfo* info, | 145 ResourceLoaderBridge::ResponseInfo* info, |
| 144 std::string* data, URLRequestStatus* status) { | 146 std::string* data, URLRequestStatus* status) { |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 | 689 |
| 688 void WebURLLoaderImpl::cancel() { | 690 void WebURLLoaderImpl::cancel() { |
| 689 context_->Cancel(); | 691 context_->Cancel(); |
| 690 } | 692 } |
| 691 | 693 |
| 692 void WebURLLoaderImpl::setDefersLoading(bool value) { | 694 void WebURLLoaderImpl::setDefersLoading(bool value) { |
| 693 context_->SetDefersLoading(value); | 695 context_->SetDefersLoading(value); |
| 694 } | 696 } |
| 695 | 697 |
| 696 } // namespace webkit_glue | 698 } // namespace webkit_glue |
| OLD | NEW |