| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 void setNetworkState(NetworkState); | 471 void setNetworkState(NetworkState); |
| 472 | 472 |
| 473 void audioTracksTimerFired(Timer<HTMLMediaElement>*); | 473 void audioTracksTimerFired(Timer<HTMLMediaElement>*); |
| 474 | 474 |
| 475 // TODO(liberato): remove once autoplay gesture override experiment conclude
s. | 475 // TODO(liberato): remove once autoplay gesture override experiment conclude
s. |
| 476 void triggerAutoplayViewportCheckForTesting(); | 476 void triggerAutoplayViewportCheckForTesting(); |
| 477 | 477 |
| 478 void scheduleResolvePlayPromises(); | 478 void scheduleResolvePlayPromises(); |
| 479 void scheduleRejectPlayPromises(ExceptionCode); | 479 void scheduleRejectPlayPromises(ExceptionCode); |
| 480 void scheduleNotifyPlaying(); | 480 void scheduleNotifyPlaying(); |
| 481 | 481 void resolveScheduledPlayPromises(); |
| 482 void resolvePlayPromises(); | 482 void rejectScheduledPlayPromises(); |
| 483 // TODO(mlamouri): this is used for cancellable tasks because we can't pass | |
| 484 // parameters. | |
| 485 void rejectPlayPromises(); | |
| 486 void rejectPlayPromises(ExceptionCode, const String&); | 483 void rejectPlayPromises(ExceptionCode, const String&); |
| 484 void rejectPlayPromisesInternal(ExceptionCode, const String&); |
| 487 | 485 |
| 488 EnumerationHistogram& showControlsHistogram() const; | 486 EnumerationHistogram& showControlsHistogram() const; |
| 489 | 487 |
| 490 void recordAutoplaySourceMetric(int source); | 488 void recordAutoplaySourceMetric(int source); |
| 491 | 489 |
| 492 UnthrottledTimer<HTMLMediaElement> m_loadTimer; | 490 UnthrottledTimer<HTMLMediaElement> m_loadTimer; |
| 493 UnthrottledTimer<HTMLMediaElement> m_progressEventTimer; | 491 UnthrottledTimer<HTMLMediaElement> m_progressEventTimer; |
| 494 UnthrottledTimer<HTMLMediaElement> m_playbackProgressTimer; | 492 UnthrottledTimer<HTMLMediaElement> m_playbackProgressTimer; |
| 495 UnthrottledTimer<HTMLMediaElement> m_audioTracksTimer; | 493 UnthrottledTimer<HTMLMediaElement> m_audioTracksTimer; |
| 496 Member<TimeRanges> m_playedTimeRanges; | 494 Member<TimeRanges> m_playedTimeRanges; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 // Whether this element is in overlay fullscreen mode. | 584 // Whether this element is in overlay fullscreen mode. |
| 587 bool m_inOverlayFullscreenVideo : 1; | 585 bool m_inOverlayFullscreenVideo : 1; |
| 588 | 586 |
| 589 Member<AudioTrackList> m_audioTracks; | 587 Member<AudioTrackList> m_audioTracks; |
| 590 Member<VideoTrackList> m_videoTracks; | 588 Member<VideoTrackList> m_videoTracks; |
| 591 Member<TextTrackList> m_textTracks; | 589 Member<TextTrackList> m_textTracks; |
| 592 HeapVector<Member<TextTrack>> m_textTracksWhenResourceSelectionBegan; | 590 HeapVector<Member<TextTrack>> m_textTracksWhenResourceSelectionBegan; |
| 593 | 591 |
| 594 Member<CueTimeline> m_cueTimeline; | 592 Member<CueTimeline> m_cueTimeline; |
| 595 | 593 |
| 596 HeapVector<Member<ScriptPromiseResolver>> m_playResolvers; | 594 HeapVector<Member<ScriptPromiseResolver>> m_playPromiseResolvers; |
| 597 OwnPtr<CancellableTaskFactory> m_playPromiseResolveTask; | 595 OwnPtr<CancellableTaskFactory> m_playPromiseResolveTask; |
| 598 OwnPtr<CancellableTaskFactory> m_playPromiseRejectTask; | 596 OwnPtr<CancellableTaskFactory> m_playPromiseRejectTask; |
| 597 HeapVector<Member<ScriptPromiseResolver>> m_playPromiseResolveList; |
| 598 HeapVector<Member<ScriptPromiseResolver>> m_playPromiseRejectList; |
| 599 ExceptionCode m_playPromiseErrorCode; | 599 ExceptionCode m_playPromiseErrorCode; |
| 600 | 600 |
| 601 // This is a weak reference, since m_audioSourceNode holds a reference to us
. | 601 // This is a weak reference, since m_audioSourceNode holds a reference to us
. |
| 602 // TODO(Oilpan): Consider making this a strongly traced pointer with oilpan
where strong cycles are not a problem. | 602 // TODO(Oilpan): Consider making this a strongly traced pointer with oilpan
where strong cycles are not a problem. |
| 603 GC_PLUGIN_IGNORE("http://crbug.com/404577") | 603 GC_PLUGIN_IGNORE("http://crbug.com/404577") |
| 604 WeakMember<AudioSourceProviderClient> m_audioSourceNode; | 604 WeakMember<AudioSourceProviderClient> m_audioSourceNode; |
| 605 | 605 |
| 606 // AudioClientImpl wraps an AudioSourceProviderClient. | 606 // AudioClientImpl wraps an AudioSourceProviderClient. |
| 607 // When the audio format is known, Chromium calls setFormat(). | 607 // When the audio format is known, Chromium calls setFormat(). |
| 608 class AudioClientImpl final : public GarbageCollectedFinalized<AudioClientIm
pl>, public WebAudioSourceProviderClient { | 608 class AudioClientImpl final : public GarbageCollectedFinalized<AudioClientIm
pl>, public WebAudioSourceProviderClient { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 inline bool isHTMLMediaElement(const HTMLElement& element) | 670 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 671 { | 671 { |
| 672 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 672 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 673 } | 673 } |
| 674 | 674 |
| 675 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 675 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 676 | 676 |
| 677 } // namespace blink | 677 } // namespace blink |
| 678 | 678 |
| 679 #endif // HTMLMediaElement_h | 679 #endif // HTMLMediaElement_h |
| OLD | NEW |