OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 2011, 2012 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 const ResourceRequest& webcoreRequest = newRequest.toResourceRequest(); | 351 const ResourceRequest& webcoreRequest = newRequest.toResourceRequest(); |
352 if (webcoreRequest.requestContext() == WebURLRequest::RequestContextUnsp
ecified) { | 352 if (webcoreRequest.requestContext() == WebURLRequest::RequestContextUnsp
ecified) { |
353 // FIXME: We load URLs without setting a TargetType (and therefore a
request context) in several | 353 // FIXME: We load URLs without setting a TargetType (and therefore a
request context) in several |
354 // places in content/ (P2PPortAllocatorSession::AllocateLegacyRelayS
ession, for example). Remove | 354 // places in content/ (P2PPortAllocatorSession::AllocateLegacyRelayS
ession, for example). Remove |
355 // this once those places are patched up. | 355 // this once those places are patched up. |
356 newRequest.setRequestContext(WebURLRequest::RequestContextInternal); | 356 newRequest.setRequestContext(WebURLRequest::RequestContextInternal); |
357 } | 357 } |
358 | 358 |
359 Document* webcoreDocument = m_frameImpl->frame()->document(); | 359 Document* webcoreDocument = m_frameImpl->frame()->document(); |
360 ASSERT(webcoreDocument); | 360 ASSERT(webcoreDocument); |
361 m_loader = DocumentThreadableLoader::create(*webcoreDocument, m_clientAd
apter.get(), webcoreRequest, options, resourceLoaderOptions); | 361 m_loader = DocumentThreadableLoader::create(*webcoreDocument, m_clientAd
apter.get(), options, resourceLoaderOptions); |
| 362 m_loader->start(webcoreRequest); |
362 } | 363 } |
363 | 364 |
364 if (!m_loader) { | 365 if (!m_loader) { |
365 // FIXME: return meaningful error codes. | 366 // FIXME: return meaningful error codes. |
366 m_clientAdapter->setDelayedError(ResourceError()); | 367 m_clientAdapter->setDelayedError(ResourceError()); |
367 } | 368 } |
368 m_clientAdapter->enableErrorNotifications(); | 369 m_clientAdapter->enableErrorNotifications(); |
369 } | 370 } |
370 | 371 |
371 void AssociatedURLLoader::cancel() | 372 void AssociatedURLLoader::cancel() |
372 { | 373 { |
373 if (m_clientAdapter) | 374 if (m_clientAdapter) |
374 m_clientAdapter->clearClient(); | 375 m_clientAdapter->clearClient(); |
375 if (m_loader) | 376 if (m_loader) |
376 m_loader->cancel(); | 377 m_loader->cancel(); |
377 } | 378 } |
378 | 379 |
379 void AssociatedURLLoader::setDefersLoading(bool defersLoading) | 380 void AssociatedURLLoader::setDefersLoading(bool defersLoading) |
380 { | 381 { |
381 if (m_loader) | 382 if (m_loader) |
382 m_loader->setDefersLoading(defersLoading); | 383 m_loader->setDefersLoading(defersLoading); |
383 } | 384 } |
384 | 385 |
385 void AssociatedURLLoader::setLoadingTaskRunner(blink::WebTaskRunner*) | 386 void AssociatedURLLoader::setLoadingTaskRunner(blink::WebTaskRunner*) |
386 { | 387 { |
387 // TODO(alexclarke): Maybe support this one day if it proves worthwhile. | 388 // TODO(alexclarke): Maybe support this one day if it proves worthwhile. |
388 } | 389 } |
389 | 390 |
390 } // namespace blink | 391 } // namespace blink |
OLD | NEW |