| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 203 |
| 204 m_client = client; | 204 m_client = client; |
| 205 ASSERT(m_client); | 205 ASSERT(m_client); |
| 206 | 206 |
| 207 ThreadableLoaderOptions options; | 207 ThreadableLoaderOptions options; |
| 208 options.sendLoadCallbacks = true; // Always send callbacks. | 208 options.sendLoadCallbacks = true; // Always send callbacks. |
| 209 options.sniffContent = m_options.sniffContent; | 209 options.sniffContent = m_options.sniffContent; |
| 210 options.allowCredentials = m_options.allowCredentials; | 210 options.allowCredentials = m_options.allowCredentials; |
| 211 options.forcePreflight = m_options.forcePreflight; | 211 options.forcePreflight = m_options.forcePreflight; |
| 212 options.crossOriginRequestPolicy = static_cast<WebCore::CrossOriginRequestPo
licy>(m_options.crossOriginRequestPolicy); | 212 options.crossOriginRequestPolicy = static_cast<WebCore::CrossOriginRequestPo
licy>(m_options.crossOriginRequestPolicy); |
| 213 options.shouldBufferData = false; |
| 213 | 214 |
| 214 const ResourceRequest& webcoreRequest = request.toResourceRequest(); | 215 const ResourceRequest& webcoreRequest = request.toResourceRequest(); |
| 215 Document* webcoreDocument = m_frameImpl->frame()->document(); | 216 Document* webcoreDocument = m_frameImpl->frame()->document(); |
| 216 m_clientAdapter = ClientAdapter::create(this, m_client, request.downloadToFi
le()); | 217 m_clientAdapter = ClientAdapter::create(this, m_client, request.downloadToFi
le()); |
| 217 | 218 |
| 218 m_loader = DocumentThreadableLoader::create(webcoreDocument, m_clientAdapter
.get(), webcoreRequest, options); | 219 m_loader = DocumentThreadableLoader::create(webcoreDocument, m_clientAdapter
.get(), webcoreRequest, options); |
| 219 } | 220 } |
| 220 | 221 |
| 221 void AssociatedURLLoader::cancel() | 222 void AssociatedURLLoader::cancel() |
| 222 { | 223 { |
| 223 if (m_loader) { | 224 if (m_loader) { |
| 224 m_clientAdapter->clearClient(); | 225 m_clientAdapter->clearClient(); |
| 225 m_loader->cancel(); | 226 m_loader->cancel(); |
| 226 } | 227 } |
| 227 } | 228 } |
| 228 | 229 |
| 229 void AssociatedURLLoader::setDefersLoading(bool defersLoading) | 230 void AssociatedURLLoader::setDefersLoading(bool defersLoading) |
| 230 { | 231 { |
| 231 if (m_loader) | 232 if (m_loader) |
| 232 m_loader->setDefersLoading(defersLoading); | 233 m_loader->setDefersLoading(defersLoading); |
| 233 } | 234 } |
| 234 | 235 |
| 235 } // namespace WebKit | 236 } // namespace WebKit |
| OLD | NEW |