| 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 26 matching lines...) Expand all Loading... |
| 37 #include "core/html/track/TextTrack.h" | 37 #include "core/html/track/TextTrack.h" |
| 38 #include "platform/Supplementable.h" | 38 #include "platform/Supplementable.h" |
| 39 #include "platform/audio/AudioSourceProvider.h" | 39 #include "platform/audio/AudioSourceProvider.h" |
| 40 #include "public/platform/WebAudioSourceProviderClient.h" | 40 #include "public/platform/WebAudioSourceProviderClient.h" |
| 41 #include "public/platform/WebMediaPlayerClient.h" | 41 #include "public/platform/WebMediaPlayerClient.h" |
| 42 #include "public/platform/WebMimeRegistry.h" | 42 #include "public/platform/WebMimeRegistry.h" |
| 43 #include <memory> | 43 #include <memory> |
| 44 | 44 |
| 45 namespace blink { | 45 namespace blink { |
| 46 | 46 |
| 47 enum class AutoplaySource; |
| 48 |
| 47 class AudioSourceProviderClient; | 49 class AudioSourceProviderClient; |
| 48 class AudioTrackList; | 50 class AudioTrackList; |
| 51 class AutoplayUmaHelper; |
| 49 class ContentType; | 52 class ContentType; |
| 50 class CueTimeline; | 53 class CueTimeline; |
| 51 class ElementVisibilityObserver; | 54 class ElementVisibilityObserver; |
| 52 class EnumerationHistogram; | 55 class EnumerationHistogram; |
| 53 class Event; | 56 class Event; |
| 54 class ExceptionState; | 57 class ExceptionState; |
| 55 class HTMLSourceElement; | 58 class HTMLSourceElement; |
| 56 class HTMLTrackElement; | 59 class HTMLTrackElement; |
| 57 class KURL; | 60 class KURL; |
| 58 class MediaControls; | 61 class MediaControls; |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 void scheduleResolvePlayPromises(); | 495 void scheduleResolvePlayPromises(); |
| 493 void scheduleRejectPlayPromises(ExceptionCode); | 496 void scheduleRejectPlayPromises(ExceptionCode); |
| 494 void scheduleNotifyPlaying(); | 497 void scheduleNotifyPlaying(); |
| 495 void resolveScheduledPlayPromises(); | 498 void resolveScheduledPlayPromises(); |
| 496 void rejectScheduledPlayPromises(); | 499 void rejectScheduledPlayPromises(); |
| 497 void rejectPlayPromises(ExceptionCode, const String&); | 500 void rejectPlayPromises(ExceptionCode, const String&); |
| 498 void rejectPlayPromisesInternal(ExceptionCode, const String&); | 501 void rejectPlayPromisesInternal(ExceptionCode, const String&); |
| 499 | 502 |
| 500 EnumerationHistogram& showControlsHistogram() const; | 503 EnumerationHistogram& showControlsHistogram() const; |
| 501 | 504 |
| 502 void recordAutoplaySourceMetric(int source); | 505 void recordAutoplaySourceMetric(AutoplaySource); |
| 503 void recordAutoplayUnmuteStatus(AutoplayUnmuteActionStatus); | 506 void recordAutoplayUnmuteStatus(AutoplayUnmuteActionStatus); |
| 504 | 507 |
| 505 void onVisibilityChangedForAutoplay(bool isVisible); | 508 void onVisibilityChangedForAutoplay(bool isVisible); |
| 506 | 509 |
| 507 UnthrottledTimer<HTMLMediaElement> m_loadTimer; | 510 UnthrottledTimer<HTMLMediaElement> m_loadTimer; |
| 508 UnthrottledTimer<HTMLMediaElement> m_progressEventTimer; | 511 UnthrottledTimer<HTMLMediaElement> m_progressEventTimer; |
| 509 UnthrottledTimer<HTMLMediaElement> m_playbackProgressTimer; | 512 UnthrottledTimer<HTMLMediaElement> m_playbackProgressTimer; |
| 510 UnthrottledTimer<HTMLMediaElement> m_audioTracksTimer; | 513 UnthrottledTimer<HTMLMediaElement> m_audioTracksTimer; |
| 511 Member<TimeRanges> m_playedTimeRanges; | 514 Member<TimeRanges> m_playedTimeRanges; |
| 512 Member<GenericEventQueue> m_asyncEventQueue; | 515 Member<GenericEventQueue> m_asyncEventQueue; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 | 674 |
| 672 class AutoplayHelperClientImpl; | 675 class AutoplayHelperClientImpl; |
| 673 | 676 |
| 674 friend class Internals; | 677 friend class Internals; |
| 675 friend class TrackDisplayUpdateScope; | 678 friend class TrackDisplayUpdateScope; |
| 676 friend class AutoplayExperimentHelper; | 679 friend class AutoplayExperimentHelper; |
| 677 friend class MediaControlsTest; | 680 friend class MediaControlsTest; |
| 678 | 681 |
| 679 Member<AutoplayExperimentHelper::Client> m_autoplayHelperClient; | 682 Member<AutoplayExperimentHelper::Client> m_autoplayHelperClient; |
| 680 Member<AutoplayExperimentHelper> m_autoplayHelper; | 683 Member<AutoplayExperimentHelper> m_autoplayHelper; |
| 684 Member<AutoplayUmaHelper> m_autoplayUmaHelper; |
| 681 | 685 |
| 682 WebRemotePlaybackClient* m_remotePlaybackClient; | 686 WebRemotePlaybackClient* m_remotePlaybackClient; |
| 683 | 687 |
| 684 // class AutoplayVisibilityObserver; | 688 // class AutoplayVisibilityObserver; |
| 685 Member<ElementVisibilityObserver> m_autoplayVisibilityObserver; | 689 Member<ElementVisibilityObserver> m_autoplayVisibilityObserver; |
| 686 | 690 |
| 687 static URLRegistry* s_mediaStreamRegistry; | 691 static URLRegistry* s_mediaStreamRegistry; |
| 688 }; | 692 }; |
| 689 | 693 |
| 690 inline bool isHTMLMediaElement(const HTMLElement& element) | 694 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 691 { | 695 { |
| 692 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 696 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 693 } | 697 } |
| 694 | 698 |
| 695 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 699 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 696 | 700 |
| 697 } // namespace blink | 701 } // namespace blink |
| 698 | 702 |
| 699 #endif // HTMLMediaElement_h | 703 #endif // HTMLMediaElement_h |
| OLD | NEW |