| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 , m_resolver(ScriptPromiseResolver::create(scriptState)) | 276 , m_resolver(ScriptPromiseResolver::create(scriptState)) |
| 277 , m_cropRect(cropRect) | 277 , m_cropRect(cropRect) |
| 278 { | 278 { |
| 279 } | 279 } |
| 280 | 280 |
| 281 void ImageBitmapFactories::ImageBitmapLoader::loadBlobAsync(ExecutionContext* co
ntext, Blob* blob) | 281 void ImageBitmapFactories::ImageBitmapLoader::loadBlobAsync(ExecutionContext* co
ntext, Blob* blob) |
| 282 { | 282 { |
| 283 m_loader.start(context, blob->blobDataHandle()); | 283 m_loader.start(context, blob->blobDataHandle()); |
| 284 } | 284 } |
| 285 | 285 |
| 286 void ImageBitmapFactories::trace(Visitor* visitor) | 286 DEFINE_TRACE(ImageBitmapFactories) |
| 287 { | 287 { |
| 288 visitor->trace(m_pendingLoaders); | 288 visitor->trace(m_pendingLoaders); |
| 289 WillBeHeapSupplement<LocalDOMWindow>::trace(visitor); | 289 WillBeHeapSupplement<LocalDOMWindow>::trace(visitor); |
| 290 WillBeHeapSupplement<WorkerGlobalScope>::trace(visitor); | 290 WillBeHeapSupplement<WorkerGlobalScope>::trace(visitor); |
| 291 } | 291 } |
| 292 | 292 |
| 293 void ImageBitmapFactories::ImageBitmapLoader::rejectPromise() | 293 void ImageBitmapFactories::ImageBitmapLoader::rejectPromise() |
| 294 { | 294 { |
| 295 m_resolver->reject(ScriptValue(m_resolver->scriptState(), v8::Null(m_resolve
r->scriptState()->isolate()))); | 295 m_resolver->reject(ScriptValue(m_resolver->scriptState(), v8::Null(m_resolve
r->scriptState()->isolate()))); |
| 296 m_factory->didFinishLoading(this); | 296 m_factory->didFinishLoading(this); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 325 RefPtrWillBeRawPtr<ImageBitmap> imageBitmap = ImageBitmap::create(image.get(
), m_cropRect); | 325 RefPtrWillBeRawPtr<ImageBitmap> imageBitmap = ImageBitmap::create(image.get(
), m_cropRect); |
| 326 m_resolver->resolve(imageBitmap.release()); | 326 m_resolver->resolve(imageBitmap.release()); |
| 327 m_factory->didFinishLoading(this); | 327 m_factory->didFinishLoading(this); |
| 328 } | 328 } |
| 329 | 329 |
| 330 void ImageBitmapFactories::ImageBitmapLoader::didFail(FileError::ErrorCode) | 330 void ImageBitmapFactories::ImageBitmapLoader::didFail(FileError::ErrorCode) |
| 331 { | 331 { |
| 332 rejectPromise(); | 332 rejectPromise(); |
| 333 } | 333 } |
| 334 | 334 |
| 335 void ImageBitmapFactories::ImageBitmapLoader::trace(Visitor* visitor) | 335 DEFINE_TRACE(ImageBitmapFactories::ImageBitmapLoader) |
| 336 { | 336 { |
| 337 visitor->trace(m_factory); | 337 visitor->trace(m_factory); |
| 338 visitor->trace(m_resolver); | 338 visitor->trace(m_resolver); |
| 339 } | 339 } |
| 340 | 340 |
| 341 } // namespace blink | 341 } // namespace blink |
| OLD | NEW |