OLD | NEW |
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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 } | 170 } |
171 | 171 |
172 void removeElementFromDocumentMap(HTMLMediaElement* element, | 172 void removeElementFromDocumentMap(HTMLMediaElement* element, |
173 Document* document) { | 173 Document* document) { |
174 DocumentElementSetMap& map = documentToElementSetMap(); | 174 DocumentElementSetMap& map = documentToElementSetMap(); |
175 auto it = map.find(document); | 175 auto it = map.find(document); |
176 DCHECK(it != map.end()); | 176 DCHECK(it != map.end()); |
177 WeakMediaElementSet* set = it->value; | 177 WeakMediaElementSet* set = it->value; |
178 set->erase(element); | 178 set->erase(element); |
179 if (set->isEmpty()) | 179 if (set->isEmpty()) |
180 map.remove(it); | 180 map.erase(it); |
181 } | 181 } |
182 | 182 |
183 class AudioSourceProviderClientLockScope { | 183 class AudioSourceProviderClientLockScope { |
184 STACK_ALLOCATED(); | 184 STACK_ALLOCATED(); |
185 | 185 |
186 public: | 186 public: |
187 AudioSourceProviderClientLockScope(HTMLMediaElement& element) | 187 AudioSourceProviderClientLockScope(HTMLMediaElement& element) |
188 : m_client(element.audioSourceNode()) { | 188 : m_client(element.audioSourceNode()) { |
189 if (m_client) | 189 if (m_client) |
190 m_client->lock(); | 190 m_client->lock(); |
(...skipping 4031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4222 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); | 4222 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); |
4223 } | 4223 } |
4224 | 4224 |
4225 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { | 4225 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { |
4226 m_mostlyFillingViewport = true; | 4226 m_mostlyFillingViewport = true; |
4227 if (m_webMediaPlayer) | 4227 if (m_webMediaPlayer) |
4228 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); | 4228 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); |
4229 } | 4229 } |
4230 | 4230 |
4231 } // namespace blink | 4231 } // namespace blink |
OLD | NEW |