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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2696183002: Migrate WTF::HashSet::remove() to ::erase() [part 1] (Closed)
Patch Set: one more platform-specific reference 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) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 set->insert(element); 167 set->insert(element);
168 } 168 }
169 169
170 void removeElementFromDocumentMap(HTMLMediaElement* element, 170 void removeElementFromDocumentMap(HTMLMediaElement* element,
171 Document* document) { 171 Document* document) {
172 DocumentElementSetMap& map = documentToElementSetMap(); 172 DocumentElementSetMap& map = documentToElementSetMap();
173 auto it = map.find(document); 173 auto it = map.find(document);
174 DCHECK(it != map.end()); 174 DCHECK(it != map.end());
175 WeakMediaElementSet* set = it->value; 175 WeakMediaElementSet* set = it->value;
176 set->remove(element); 176 set->erase(element);
177 if (set->isEmpty()) 177 if (set->isEmpty())
178 map.remove(it); 178 map.remove(it);
179 } 179 }
180 180
181 class AudioSourceProviderClientLockScope { 181 class AudioSourceProviderClientLockScope {
182 STACK_ALLOCATED(); 182 STACK_ALLOCATED();
183 183
184 public: 184 public:
185 AudioSourceProviderClientLockScope(HTMLMediaElement& element) 185 AudioSourceProviderClientLockScope(HTMLMediaElement& element)
186 : m_client(element.audioSourceNode()) { 186 : m_client(element.audioSourceNode()) {
(...skipping 3961 matching lines...) Expand 10 before | Expand all | Expand 10 after
4148 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); 4148 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE);
4149 } 4149 }
4150 4150
4151 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { 4151 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) {
4152 m_mostlyFillingViewport = true; 4152 m_mostlyFillingViewport = true;
4153 if (m_webMediaPlayer) 4153 if (m_webMediaPlayer)
4154 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); 4154 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport);
4155 } 4155 }
4156 4156
4157 } // namespace blink 4157 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698