Chromium Code Reviews| 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 21 matching lines...) Expand all Loading... | |
| 32 #include "core/dom/ActiveDOMObject.h" | 32 #include "core/dom/ActiveDOMObject.h" |
| 33 #include "core/dom/ExceptionCode.h" | 33 #include "core/dom/ExceptionCode.h" |
| 34 #include "core/events/GenericEventQueue.h" | 34 #include "core/events/GenericEventQueue.h" |
| 35 #include "core/html/AutoplayExperimentHelper.h" | 35 #include "core/html/AutoplayExperimentHelper.h" |
| 36 #include "core/html/HTMLElement.h" | 36 #include "core/html/HTMLElement.h" |
| 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/WebMediaPlayerSource.h" | |
| 43 #include "public/platform/WebMimeRegistry.h" | 42 #include "public/platform/WebMimeRegistry.h" |
| 44 | 43 |
| 45 namespace blink { | 44 namespace blink { |
| 46 | 45 |
| 47 class AudioSourceProviderClient; | 46 class AudioSourceProviderClient; |
| 48 class AudioTrackList; | 47 class AudioTrackList; |
| 49 class ContentType; | 48 class ContentType; |
| 50 class CueTimeline; | 49 class CueTimeline; |
| 51 class Event; | 50 class Event; |
| 52 class ExceptionState; | 51 class ExceptionState; |
| 53 class HTMLSourceElement; | 52 class HTMLSourceElement; |
| 54 class HTMLTrackElement; | 53 class HTMLTrackElement; |
| 55 class KURL; | 54 class KURL; |
| 56 class MediaControls; | 55 class MediaControls; |
| 57 class MediaError; | 56 class MediaError; |
| 57 class MediaStreamDescriptor; | |
| 58 class HTMLMediaSource; | 58 class HTMLMediaSource; |
| 59 class ScriptState; | 59 class ScriptState; |
| 60 class TextTrackContainer; | 60 class TextTrackContainer; |
| 61 class TextTrackList; | 61 class TextTrackList; |
| 62 class TimeRanges; | 62 class TimeRanges; |
| 63 class URLRegistry; | 63 class URLRegistry; |
| 64 class VideoTrackList; | 64 class VideoTrackList; |
| 65 class WebAudioSourceProvider; | 65 class WebAudioSourceProvider; |
| 66 class WebInbandTextTrack; | 66 class WebInbandTextTrack; |
| 67 class WebLayer; | 67 class WebLayer; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 | 104 |
| 105 bool hasRemoteRoutes() const { return m_remoteRoutesAvailable; } | 105 bool hasRemoteRoutes() const { return m_remoteRoutesAvailable; } |
| 106 bool isPlayingRemotely() const { return m_playingRemotely; } | 106 bool isPlayingRemotely() const { return m_playingRemotely; } |
| 107 | 107 |
| 108 // error state | 108 // error state |
| 109 MediaError* error() const; | 109 MediaError* error() const; |
| 110 | 110 |
| 111 // network state | 111 // network state |
| 112 void setSrc(const AtomicString&); | 112 void setSrc(const AtomicString&); |
| 113 const KURL& currentSrc() const { return m_currentSrc; } | 113 const KURL& currentSrc() const { return m_currentSrc; } |
| 114 void setSrcObject(const WebMediaPlayerSource&); | 114 void setSrcObject(MediaStreamDescriptor*); |
| 115 const WebMediaPlayerSource& getSrcObject() const { return m_srcObject; } | 115 MediaStreamDescriptor* getSrcObject() const { return m_srcObject.get(); } |
|
sof
2016/04/15 10:49:14
nit/fyi: get() is redundant (no need to address he
| |
| 116 | 116 |
| 117 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO _SOURCE }; | 117 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO _SOURCE }; |
| 118 NetworkState getNetworkState() const; | 118 NetworkState getNetworkState() const; |
| 119 | 119 |
| 120 String preload() const; | 120 String preload() const; |
| 121 void setPreload(const AtomicString&); | 121 void setPreload(const AtomicString&); |
| 122 WebMediaPlayer::Preload preloadType() const; | 122 WebMediaPlayer::Preload preloadType() const; |
| 123 String effectivePreload() const; | 123 String effectivePreload() const; |
| 124 WebMediaPlayer::Preload effectivePreloadType() const; | 124 WebMediaPlayer::Preload effectivePreloadType() const; |
| 125 | 125 |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 475 UnthrottledTimer<HTMLMediaElement> m_audioTracksTimer; | 475 UnthrottledTimer<HTMLMediaElement> m_audioTracksTimer; |
| 476 Member<TimeRanges> m_playedTimeRanges; | 476 Member<TimeRanges> m_playedTimeRanges; |
| 477 Member<GenericEventQueue> m_asyncEventQueue; | 477 Member<GenericEventQueue> m_asyncEventQueue; |
| 478 | 478 |
| 479 double m_playbackRate; | 479 double m_playbackRate; |
| 480 double m_defaultPlaybackRate; | 480 double m_defaultPlaybackRate; |
| 481 NetworkState m_networkState; | 481 NetworkState m_networkState; |
| 482 ReadyState m_readyState; | 482 ReadyState m_readyState; |
| 483 ReadyState m_readyStateMaximum; | 483 ReadyState m_readyStateMaximum; |
| 484 KURL m_currentSrc; | 484 KURL m_currentSrc; |
| 485 WebMediaPlayerSource m_srcObject; | 485 Member<MediaStreamDescriptor> m_srcObject; |
| 486 | 486 |
| 487 Member<MediaError> m_error; | 487 Member<MediaError> m_error; |
| 488 | 488 |
| 489 double m_volume; | 489 double m_volume; |
| 490 double m_lastSeekTime; | 490 double m_lastSeekTime; |
| 491 | 491 |
| 492 double m_previousProgressTime; | 492 double m_previousProgressTime; |
| 493 | 493 |
| 494 // Cached duration to suppress duplicate events if duration unchanged. | 494 // Cached duration to suppress duplicate events if duration unchanged. |
| 495 double m_duration; | 495 double m_duration; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 651 inline bool isHTMLMediaElement(const HTMLElement& element) | 651 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 652 { | 652 { |
| 653 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 653 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 654 } | 654 } |
| 655 | 655 |
| 656 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 656 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 657 | 657 |
| 658 } // namespace blink | 658 } // namespace blink |
| 659 | 659 |
| 660 #endif // HTMLMediaElement_h | 660 #endif // HTMLMediaElement_h |
| OLD | NEW |