Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Side by Side Diff: third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 ImageBitmapFactories* supplement = static_cast<ImageBitmapFactories*>( 192 ImageBitmapFactories* supplement = static_cast<ImageBitmapFactories*>(
193 Supplement<GlobalObject>::from(object, supplementName())); 193 Supplement<GlobalObject>::from(object, supplementName()));
194 if (!supplement) { 194 if (!supplement) {
195 supplement = new ImageBitmapFactories; 195 supplement = new ImageBitmapFactories;
196 Supplement<GlobalObject>::provideTo(object, supplementName(), supplement); 196 Supplement<GlobalObject>::provideTo(object, supplementName(), supplement);
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.add(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.remove(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,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } 321 }
322 m_factory->didFinishLoading(this); 322 m_factory->didFinishLoading(this);
323 } 323 }
324 324
325 DEFINE_TRACE(ImageBitmapFactories::ImageBitmapLoader) { 325 DEFINE_TRACE(ImageBitmapFactories::ImageBitmapLoader) {
326 visitor->trace(m_factory); 326 visitor->trace(m_factory);
327 visitor->trace(m_resolver); 327 visitor->trace(m_resolver);
328 } 328 }
329 329
330 } // namespace blink 330 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698