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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 } | 354 } |
355 | 355 |
356 bool HTMLMediaElement::mediaTracksEnabledInternally() { | 356 bool HTMLMediaElement::mediaTracksEnabledInternally() { |
357 return RuntimeEnabledFeatures::audioVideoTracksEnabled() || | 357 return RuntimeEnabledFeatures::audioVideoTracksEnabled() || |
358 RuntimeEnabledFeatures::backgroundVideoTrackOptimizationEnabled(); | 358 RuntimeEnabledFeatures::backgroundVideoTrackOptimizationEnabled(); |
359 } | 359 } |
360 | 360 |
361 HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, | 361 HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, |
362 Document& document) | 362 Document& document) |
363 : HTMLElement(tagName, document), | 363 : HTMLElement(tagName, document), |
364 ActiveScriptWrappable(this), | |
365 SuspendableObject(&document), | 364 SuspendableObject(&document), |
366 m_loadTimer(this, &HTMLMediaElement::loadTimerFired), | 365 m_loadTimer(this, &HTMLMediaElement::loadTimerFired), |
367 m_progressEventTimer(this, &HTMLMediaElement::progressEventTimerFired), | 366 m_progressEventTimer(this, &HTMLMediaElement::progressEventTimerFired), |
368 m_playbackProgressTimer(this, | 367 m_playbackProgressTimer(this, |
369 &HTMLMediaElement::playbackProgressTimerFired), | 368 &HTMLMediaElement::playbackProgressTimerFired), |
370 m_audioTracksTimer(this, &HTMLMediaElement::audioTracksTimerFired), | 369 m_audioTracksTimer(this, &HTMLMediaElement::audioTracksTimerFired), |
371 m_viewportFillDebouncerTimer( | 370 m_viewportFillDebouncerTimer( |
372 this, | 371 this, |
373 &HTMLMediaElement::viewportFillDebouncerTimerFired), | 372 &HTMLMediaElement::viewportFillDebouncerTimerFired), |
374 m_checkViewportIntersectionTimer( | 373 m_checkViewportIntersectionTimer( |
(...skipping 3729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4104 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); | 4103 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); |
4105 } | 4104 } |
4106 | 4105 |
4107 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { | 4106 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { |
4108 m_mostlyFillingViewport = true; | 4107 m_mostlyFillingViewport = true; |
4109 if (m_webMediaPlayer) | 4108 if (m_webMediaPlayer) |
4110 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); | 4109 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); |
4111 } | 4110 } |
4112 | 4111 |
4113 } // namespace blink | 4112 } // namespace blink |
OLD | NEW |