| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 } | 197 } |
| 198 return *supplement; | 198 return *supplement; |
| 199 } | 199 } |
| 200 | 200 |
| 201 void ImageBitmapFactories::addLoader(ImageBitmapLoader* loader) { | 201 void ImageBitmapFactories::addLoader(ImageBitmapLoader* loader) { |
| 202 m_pendingLoaders.insert(loader); | 202 m_pendingLoaders.insert(loader); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void ImageBitmapFactories::didFinishLoading(ImageBitmapLoader* loader) { | 205 void ImageBitmapFactories::didFinishLoading(ImageBitmapLoader* loader) { |
| 206 ASSERT(m_pendingLoaders.contains(loader)); | 206 ASSERT(m_pendingLoaders.contains(loader)); |
| 207 m_pendingLoaders.remove(loader); | 207 m_pendingLoaders.erase(loader); |
| 208 } | 208 } |
| 209 | 209 |
| 210 ImageBitmapFactories::ImageBitmapLoader::ImageBitmapLoader( | 210 ImageBitmapFactories::ImageBitmapLoader::ImageBitmapLoader( |
| 211 ImageBitmapFactories& factory, | 211 ImageBitmapFactories& factory, |
| 212 Optional<IntRect> cropRect, | 212 Optional<IntRect> cropRect, |
| 213 ScriptState* scriptState, | 213 ScriptState* scriptState, |
| 214 const ImageBitmapOptions& options) | 214 const ImageBitmapOptions& options) |
| 215 : m_loader( | 215 : m_loader( |
| 216 FileReaderLoader::create(FileReaderLoader::ReadAsArrayBuffer, this)), | 216 FileReaderLoader::create(FileReaderLoader::ReadAsArrayBuffer, this)), |
| 217 m_factory(&factory), | 217 m_factory(&factory), |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 } | 312 } |
| 313 m_factory->didFinishLoading(this); | 313 m_factory->didFinishLoading(this); |
| 314 } | 314 } |
| 315 | 315 |
| 316 DEFINE_TRACE(ImageBitmapFactories::ImageBitmapLoader) { | 316 DEFINE_TRACE(ImageBitmapFactories::ImageBitmapLoader) { |
| 317 visitor->trace(m_factory); | 317 visitor->trace(m_factory); |
| 318 visitor->trace(m_resolver); | 318 visitor->trace(m_resolver); |
| 319 } | 319 } |
| 320 | 320 |
| 321 } // namespace blink | 321 } // namespace blink |
| OLD | NEW |