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 UnthrottledTimer<HTMLMediaElement> m_loadTimer; | 488 UnthrottledTimer<HTMLMediaElement> m_loadTimer; |
491 UnthrottledTimer<HTMLMediaElement> m_progressEventTimer; | 489 UnthrottledTimer<HTMLMediaElement> m_progressEventTimer; |
492 UnthrottledTimer<HTMLMediaElement> m_playbackProgressTimer; | 490 UnthrottledTimer<HTMLMediaElement> m_playbackProgressTimer; |
493 UnthrottledTimer<HTMLMediaElement> m_audioTracksTimer; | 491 UnthrottledTimer<HTMLMediaElement> m_audioTracksTimer; |
494 Member<TimeRanges> m_playedTimeRanges; | 492 Member<TimeRanges> m_playedTimeRanges; |
495 Member<GenericEventQueue> m_asyncEventQueue; | 493 Member<GenericEventQueue> m_asyncEventQueue; |
496 | 494 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 // Whether this element is in overlay fullscreen mode. | 582 // Whether this element is in overlay fullscreen mode. |
585 bool m_inOverlayFullscreenVideo : 1; | 583 bool m_inOverlayFullscreenVideo : 1; |
586 | 584 |
587 Member<AudioTrackList> m_audioTracks; | 585 Member<AudioTrackList> m_audioTracks; |
588 Member<VideoTrackList> m_videoTracks; | 586 Member<VideoTrackList> m_videoTracks; |
589 Member<TextTrackList> m_textTracks; | 587 Member<TextTrackList> m_textTracks; |
590 HeapVector<Member<TextTrack>> m_textTracksWhenResourceSelectionBegan; | 588 HeapVector<Member<TextTrack>> m_textTracksWhenResourceSelectionBegan; |
591 | 589 |
592 Member<CueTimeline> m_cueTimeline; | 590 Member<CueTimeline> m_cueTimeline; |
593 | 591 |
594 HeapVector<Member<ScriptPromiseResolver>> m_playResolvers; | 592 HeapVector<Member<ScriptPromiseResolver>> m_playPromiseResolvers; |
595 OwnPtr<CancellableTaskFactory> m_playPromiseResolveTask; | 593 OwnPtr<CancellableTaskFactory> m_playPromiseResolveTask; |
596 OwnPtr<CancellableTaskFactory> m_playPromiseRejectTask; | 594 OwnPtr<CancellableTaskFactory> m_playPromiseRejectTask; |
| 595 HeapVector<Member<ScriptPromiseResolver>> m_playPromiseResolveList; |
| 596 HeapVector<Member<ScriptPromiseResolver>> m_playPromiseRejectList; |
597 ExceptionCode m_playPromiseErrorCode; | 597 ExceptionCode m_playPromiseErrorCode; |
598 | 598 |
599 // This is a weak reference, since m_audioSourceNode holds a reference to us
. | 599 // This is a weak reference, since m_audioSourceNode holds a reference to us
. |
600 // TODO(Oilpan): Consider making this a strongly traced pointer with oilpan
where strong cycles are not a problem. | 600 // TODO(Oilpan): Consider making this a strongly traced pointer with oilpan
where strong cycles are not a problem. |
601 GC_PLUGIN_IGNORE("http://crbug.com/404577") | 601 GC_PLUGIN_IGNORE("http://crbug.com/404577") |
602 WeakMember<AudioSourceProviderClient> m_audioSourceNode; | 602 WeakMember<AudioSourceProviderClient> m_audioSourceNode; |
603 | 603 |
604 // AudioClientImpl wraps an AudioSourceProviderClient. | 604 // AudioClientImpl wraps an AudioSourceProviderClient. |
605 // When the audio format is known, Chromium calls setFormat(). | 605 // When the audio format is known, Chromium calls setFormat(). |
606 class AudioClientImpl final : public GarbageCollectedFinalized<AudioClientIm
pl>, public WebAudioSourceProviderClient { | 606 class AudioClientImpl final : public GarbageCollectedFinalized<AudioClientIm
pl>, public WebAudioSourceProviderClient { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 inline bool isHTMLMediaElement(const HTMLElement& element) | 668 inline bool isHTMLMediaElement(const HTMLElement& element) |
669 { | 669 { |
670 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 670 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
671 } | 671 } |
672 | 672 |
673 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 673 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
674 | 674 |
675 } // namespace blink | 675 } // namespace blink |
676 | 676 |
677 #endif // HTMLMediaElement_h | 677 #endif // HTMLMediaElement_h |
OLD | NEW |