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