Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: Source/core/html/HTMLMediaElement.h

Issue 291163004: Implement media cast buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix acolwell@'s nits. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 583
575 bool m_closedCaptionsVisible : 1; 584 bool m_closedCaptionsVisible : 1;
576 585
577 bool m_completelyLoaded : 1; 586 bool m_completelyLoaded : 1;
578 bool m_havePreparedToPlay : 1; 587 bool m_havePreparedToPlay : 1;
579 bool m_delayingLoadForPreloadNone : 1; 588 bool m_delayingLoadForPreloadNone : 1;
580 589
581 bool m_tracksAreReady : 1; 590 bool m_tracksAreReady : 1;
582 bool m_haveVisibleTextTrack : 1; 591 bool m_haveVisibleTextTrack : 1;
583 bool m_processingPreferenceChange : 1; 592 bool m_processingPreferenceChange : 1;
593 bool m_remoteRoutesAvailable : 1;
594 bool m_playingRemotely : 1;
584 #if ENABLE(OILPAN) 595 #if ENABLE(OILPAN)
585 bool m_isFinalizing : 1; 596 bool m_isFinalizing : 1;
586 bool m_closeMediaSourceWhenFinalizing : 1; 597 bool m_closeMediaSourceWhenFinalizing : 1;
587 #endif 598 #endif
588 double m_lastTextTrackUpdateTime; 599 double m_lastTextTrackUpdateTime;
589 600
590 RefPtrWillBeMember<AudioTrackList> m_audioTracks; 601 RefPtrWillBeMember<AudioTrackList> m_audioTracks;
591 RefPtrWillBeMember<VideoTrackList> m_videoTracks; 602 RefPtrWillBeMember<VideoTrackList> m_videoTracks;
592 RefPtrWillBeMember<TextTrackList> m_textTracks; 603 RefPtrWillBeMember<TextTrackList> m_textTracks;
593 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel ectionBegan; 604 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel ectionBegan;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 inline bool isHTMLMediaElement(const HTMLElement& element) 646 inline bool isHTMLMediaElement(const HTMLElement& element)
636 { 647 {
637 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 648 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
638 } 649 }
639 650
640 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 651 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
641 652
642 } // namespace blink 653 } // namespace blink
643 654
644 #endif // HTMLMediaElement_h 655 #endif // HTMLMediaElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698