| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 enum DelayedActionType { | 104 enum DelayedActionType { |
| 105 LoadMediaResource = 1 << 0, | 105 LoadMediaResource = 1 << 0, |
| 106 LoadTextTrackResource = 1 << 1, | 106 LoadTextTrackResource = 1 << 1, |
| 107 TextTrackChangesNotification = 1 << 2 | 107 TextTrackChangesNotification = 1 << 2 |
| 108 }; | 108 }; |
| 109 void scheduleDelayedAction(DelayedActionType); | 109 void scheduleDelayedAction(DelayedActionType); |
| 110 | 110 |
| 111 bool isActive() const { return m_active; } | 111 bool isActive() const { return m_active; } |
| 112 | 112 |
| 113 bool hasRemoteRoutes() const { return m_remoteRoutesAvailable; } |
| 114 bool isPlayingRemotely() const { return m_playingRemotely; } |
| 115 |
| 113 // error state | 116 // error state |
| 114 PassRefPtrWillBeRawPtr<MediaError> error() const; | 117 PassRefPtrWillBeRawPtr<MediaError> error() const; |
| 115 | 118 |
| 116 // network state | 119 // network state |
| 117 void setSrc(const AtomicString&); | 120 void setSrc(const AtomicString&); |
| 118 const KURL& currentSrc() const { return m_currentSrc; } | 121 const KURL& currentSrc() const { return m_currentSrc; } |
| 119 | 122 |
| 120 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO
_SOURCE }; | 123 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO
_SOURCE }; |
| 121 NetworkState networkState() const; | 124 NetworkState networkState() const; |
| 122 | 125 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 143 void setPlaybackRate(double); | 146 void setPlaybackRate(double); |
| 144 void updatePlaybackRate(); | 147 void updatePlaybackRate(); |
| 145 PassRefPtrWillBeRawPtr<TimeRanges> played(); | 148 PassRefPtrWillBeRawPtr<TimeRanges> played(); |
| 146 PassRefPtrWillBeRawPtr<TimeRanges> seekable() const; | 149 PassRefPtrWillBeRawPtr<TimeRanges> seekable() const; |
| 147 bool ended() const; | 150 bool ended() const; |
| 148 bool autoplay() const; | 151 bool autoplay() const; |
| 149 bool loop() const; | 152 bool loop() const; |
| 150 void setLoop(bool b); | 153 void setLoop(bool b); |
| 151 void play(); | 154 void play(); |
| 152 void pause(); | 155 void pause(); |
| 156 void requestRemotePlayback(); |
| 157 void requestRemotePlaybackControl(); |
| 153 | 158 |
| 154 // statistics | 159 // statistics |
| 155 unsigned webkitAudioDecodedByteCount() const; | 160 unsigned webkitAudioDecodedByteCount() const; |
| 156 unsigned webkitVideoDecodedByteCount() const; | 161 unsigned webkitVideoDecodedByteCount() const; |
| 157 | 162 |
| 158 // media source extensions | 163 // media source extensions |
| 159 void closeMediaSource(); | 164 void closeMediaSource(); |
| 160 void durationChanged(double duration, bool requestSeek); | 165 void durationChanged(double duration, bool requestSeek); |
| 161 | 166 |
| 162 // controls | 167 // controls |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 bool hasSingleSecurityOrigin() const { return !m_player || (webMediaPlayer()
&& webMediaPlayer()->hasSingleSecurityOrigin()); } | 260 bool hasSingleSecurityOrigin() const { return !m_player || (webMediaPlayer()
&& webMediaPlayer()->hasSingleSecurityOrigin()); } |
| 256 | 261 |
| 257 bool isFullscreen() const; | 262 bool isFullscreen() const; |
| 258 void enterFullscreen(); | 263 void enterFullscreen(); |
| 259 void exitFullscreen(); | 264 void exitFullscreen(); |
| 260 | 265 |
| 261 bool hasClosedCaptions() const; | 266 bool hasClosedCaptions() const; |
| 262 bool closedCaptionsVisible() const; | 267 bool closedCaptionsVisible() const; |
| 263 void setClosedCaptionsVisible(bool); | 268 void setClosedCaptionsVisible(bool); |
| 264 | 269 |
| 270 void remoteRouteAvailabilityChanged(bool); |
| 271 void connectedToRemoteDevice(); |
| 272 void disconnectedFromRemoteDevice(); |
| 273 |
| 265 MediaControls* mediaControls() const; | 274 MediaControls* mediaControls() const; |
| 266 | 275 |
| 267 void sourceWasRemoved(HTMLSourceElement*); | 276 void sourceWasRemoved(HTMLSourceElement*); |
| 268 void sourceWasAdded(HTMLSourceElement*); | 277 void sourceWasAdded(HTMLSourceElement*); |
| 269 | 278 |
| 270 bool isPlaying() const { return m_playing; } | 279 bool isPlaying() const { return m_playing; } |
| 271 | 280 |
| 272 // ActiveDOMObject functions. | 281 // ActiveDOMObject functions. |
| 273 virtual bool hasPendingActivity() const OVERRIDE FINAL; | 282 virtual bool hasPendingActivity() const OVERRIDE FINAL; |
| 274 virtual void contextDestroyed() OVERRIDE FINAL; | 283 virtual void contextDestroyed() OVERRIDE FINAL; |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 | 580 |
| 572 bool m_closedCaptionsVisible : 1; | 581 bool m_closedCaptionsVisible : 1; |
| 573 | 582 |
| 574 bool m_completelyLoaded : 1; | 583 bool m_completelyLoaded : 1; |
| 575 bool m_havePreparedToPlay : 1; | 584 bool m_havePreparedToPlay : 1; |
| 576 bool m_delayingLoadForPreloadNone : 1; | 585 bool m_delayingLoadForPreloadNone : 1; |
| 577 | 586 |
| 578 bool m_tracksAreReady : 1; | 587 bool m_tracksAreReady : 1; |
| 579 bool m_haveVisibleTextTrack : 1; | 588 bool m_haveVisibleTextTrack : 1; |
| 580 bool m_processingPreferenceChange : 1; | 589 bool m_processingPreferenceChange : 1; |
| 590 bool m_remoteRoutesAvailable : 1; |
| 591 bool m_playingRemotely : 1; |
| 581 #if ENABLE(OILPAN) | 592 #if ENABLE(OILPAN) |
| 582 bool m_isFinalizing : 1; | 593 bool m_isFinalizing : 1; |
| 583 bool m_closeMediaSourceWhenFinalizing : 1; | 594 bool m_closeMediaSourceWhenFinalizing : 1; |
| 584 #endif | 595 #endif |
| 585 double m_lastTextTrackUpdateTime; | 596 double m_lastTextTrackUpdateTime; |
| 586 | 597 |
| 587 RefPtrWillBeMember<AudioTrackList> m_audioTracks; | 598 RefPtrWillBeMember<AudioTrackList> m_audioTracks; |
| 588 RefPtrWillBeMember<VideoTrackList> m_videoTracks; | 599 RefPtrWillBeMember<VideoTrackList> m_videoTracks; |
| 589 RefPtrWillBeMember<TextTrackList> m_textTracks; | 600 RefPtrWillBeMember<TextTrackList> m_textTracks; |
| 590 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel
ectionBegan; | 601 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel
ectionBegan; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 inline bool isHTMLMediaElement(const HTMLElement& element) | 643 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 633 { | 644 { |
| 634 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 645 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 635 } | 646 } |
| 636 | 647 |
| 637 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 648 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 638 | 649 |
| 639 } // namespace blink | 650 } // namespace blink |
| 640 | 651 |
| 641 #endif // HTMLMediaElement_h | 652 #endif // HTMLMediaElement_h |
| OLD | NEW |