Chromium Code Reviews| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 #include <memory> | 45 #include <memory> |
| 46 | 46 |
| 47 namespace blink { | 47 namespace blink { |
| 48 | 48 |
| 49 class AudioSourceProviderClient; | 49 class AudioSourceProviderClient; |
| 50 class AudioTrack; | 50 class AudioTrack; |
| 51 class AudioTrackList; | 51 class AudioTrackList; |
| 52 class AutoplayUmaHelper; | 52 class AutoplayUmaHelper; |
| 53 class ContentType; | 53 class ContentType; |
| 54 class CueTimeline; | 54 class CueTimeline; |
| 55 class ElementVisibilityObserver; | 55 class ElementViewportRatioObserver; |
| 56 class EnumerationHistogram; | 56 class EnumerationHistogram; |
| 57 class Event; | 57 class Event; |
| 58 class ExceptionState; | 58 class ExceptionState; |
| 59 class HTMLSourceElement; | 59 class HTMLSourceElement; |
| 60 class HTMLTrackElement; | 60 class HTMLTrackElement; |
| 61 class KURL; | 61 class KURL; |
| 62 class MediaControls; | 62 class MediaControls; |
| 63 class MediaError; | 63 class MediaError; |
| 64 class MediaStreamDescriptor; | 64 class MediaStreamDescriptor; |
| 65 class HTMLMediaSource; | 65 class HTMLMediaSource; |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 527 void scheduleResolvePlayPromises(); | 527 void scheduleResolvePlayPromises(); |
| 528 void scheduleRejectPlayPromises(ExceptionCode); | 528 void scheduleRejectPlayPromises(ExceptionCode); |
| 529 void scheduleNotifyPlaying(); | 529 void scheduleNotifyPlaying(); |
| 530 void resolveScheduledPlayPromises(); | 530 void resolveScheduledPlayPromises(); |
| 531 void rejectScheduledPlayPromises(); | 531 void rejectScheduledPlayPromises(); |
| 532 void rejectPlayPromises(ExceptionCode, const String&); | 532 void rejectPlayPromises(ExceptionCode, const String&); |
| 533 void rejectPlayPromisesInternal(ExceptionCode, const String&); | 533 void rejectPlayPromisesInternal(ExceptionCode, const String&); |
| 534 | 534 |
| 535 EnumerationHistogram& showControlsHistogram() const; | 535 EnumerationHistogram& showControlsHistogram() const; |
| 536 | 536 |
| 537 void onVisibilityChangedForAutoplay(bool isVisible); | 537 void onVideoViewportRatioChanged(bool isVisible); |
|
miu
2016/11/09 22:02:08
Per comments in other file, this callback method s
xjz
2016/11/11 01:07:29
Done.
| |
| 538 | 538 |
| 539 UnthrottledThreadTimer<HTMLMediaElement> m_loadTimer; | 539 UnthrottledThreadTimer<HTMLMediaElement> m_loadTimer; |
| 540 UnthrottledThreadTimer<HTMLMediaElement> m_progressEventTimer; | 540 UnthrottledThreadTimer<HTMLMediaElement> m_progressEventTimer; |
| 541 UnthrottledThreadTimer<HTMLMediaElement> m_playbackProgressTimer; | 541 UnthrottledThreadTimer<HTMLMediaElement> m_playbackProgressTimer; |
| 542 UnthrottledThreadTimer<HTMLMediaElement> m_audioTracksTimer; | 542 UnthrottledThreadTimer<HTMLMediaElement> m_audioTracksTimer; |
| 543 Member<TimeRanges> m_playedTimeRanges; | 543 Member<TimeRanges> m_playedTimeRanges; |
| 544 Member<GenericEventQueue> m_asyncEventQueue; | 544 Member<GenericEventQueue> m_asyncEventQueue; |
| 545 | 545 |
| 546 double m_playbackRate; | 546 double m_playbackRate; |
| 547 double m_defaultPlaybackRate; | 547 double m_defaultPlaybackRate; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 709 | 709 |
| 710 friend class AutoplayUmaHelper; // for isAutoplayAllowedPerSettings | 710 friend class AutoplayUmaHelper; // for isAutoplayAllowedPerSettings |
| 711 friend class Internals; | 711 friend class Internals; |
| 712 friend class TrackDisplayUpdateScope; | 712 friend class TrackDisplayUpdateScope; |
| 713 friend class AutoplayExperimentHelper; | 713 friend class AutoplayExperimentHelper; |
| 714 friend class MediaControlsTest; | 714 friend class MediaControlsTest; |
| 715 | 715 |
| 716 Member<AutoplayExperimentHelper::Client> m_autoplayHelperClient; | 716 Member<AutoplayExperimentHelper::Client> m_autoplayHelperClient; |
| 717 Member<AutoplayExperimentHelper> m_autoplayHelper; | 717 Member<AutoplayExperimentHelper> m_autoplayHelper; |
| 718 Member<AutoplayUmaHelper> m_autoplayUmaHelper; | 718 Member<AutoplayUmaHelper> m_autoplayUmaHelper; |
| 719 bool m_shouldAutoplayWhenVisible = false; | |
| 719 | 720 |
| 720 WebRemotePlaybackClient* m_remotePlaybackClient; | 721 WebRemotePlaybackClient* m_remotePlaybackClient; |
| 721 | 722 |
| 722 // class AutoplayVisibilityObserver; | 723 Member<ElementViewportRatioObserver> m_videoViewportRatioObserver; |
| 723 Member<ElementVisibilityObserver> m_autoplayVisibilityObserver; | |
| 724 | 724 |
| 725 static URLRegistry* s_mediaStreamRegistry; | 725 static URLRegistry* s_mediaStreamRegistry; |
| 726 }; | 726 }; |
| 727 | 727 |
| 728 inline bool isHTMLMediaElement(const HTMLElement& element) { | 728 inline bool isHTMLMediaElement(const HTMLElement& element) { |
| 729 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 729 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 730 } | 730 } |
| 731 | 731 |
| 732 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 732 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 733 | 733 |
| 734 } // namespace blink | 734 } // namespace blink |
| 735 | 735 |
| 736 #endif // HTMLMediaElement_h | 736 #endif // HTMLMediaElement_h |
| OLD | NEW |