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

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

Issue 2480003002: [RemotePlayback] Keep track of source compatibility and reject prompt() correspondingly (Closed)
Patch Set: Fixed the java enum comment Created 4 years, 1 month 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 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 bool supportsSave() const; 110 bool supportsSave() const;
111 111
112 WebLayer* platformLayer() const; 112 WebLayer* platformLayer() const;
113 113
114 enum DelayedActionType { 114 enum DelayedActionType {
115 LoadMediaResource = 1 << 0, 115 LoadMediaResource = 1 << 0,
116 LoadTextTrackResource = 1 << 1 116 LoadTextTrackResource = 1 << 1
117 }; 117 };
118 void scheduleTextTrackResourceLoad(); 118 void scheduleTextTrackResourceLoad();
119 119
120 bool hasRemoteRoutes() const { return m_remoteRoutesAvailable; } 120 bool hasRemoteRoutes() const;
121 bool isPlayingRemotely() const { return m_playingRemotely; } 121 bool isPlayingRemotely() const { return m_playingRemotely; }
122 122
123 // error state 123 // error state
124 MediaError* error() const; 124 MediaError* error() const;
125 125
126 // network state 126 // network state
127 void setSrc(const AtomicString&); 127 void setSrc(const AtomicString&);
128 const KURL& currentSrc() const { return m_currentSrc; } 128 const KURL& currentSrc() const { return m_currentSrc; }
129 void setSrcObject(MediaStreamDescriptor*); 129 void setSrcObject(MediaStreamDescriptor*);
130 MediaStreamDescriptor* getSrcObject() const { return m_srcObject.get(); } 130 MediaStreamDescriptor* getSrcObject() const { return m_srcObject.get(); }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 void videoWillBeDrawnToCanvas() const; 302 void videoWillBeDrawnToCanvas() const;
303 303
304 // Temporary callback for crbug.com/487345,402044 304 // Temporary callback for crbug.com/487345,402044
305 void notifyPositionMayHaveChanged(const IntRect&); 305 void notifyPositionMayHaveChanged(const IntRect&);
306 void updatePositionNotificationRegistration(); 306 void updatePositionNotificationRegistration();
307 307
308 WebRemotePlaybackClient* remotePlaybackClient() { 308 WebRemotePlaybackClient* remotePlaybackClient() {
309 return m_remotePlaybackClient; 309 return m_remotePlaybackClient;
310 } 310 }
311 const WebRemotePlaybackClient* remotePlaybackClient() const {
312 return m_remotePlaybackClient;
313 }
311 314
312 protected: 315 protected:
313 HTMLMediaElement(const QualifiedName&, Document&); 316 HTMLMediaElement(const QualifiedName&, Document&);
314 ~HTMLMediaElement() override; 317 ~HTMLMediaElement() override;
315 void dispose(); 318 void dispose();
316 319
317 void parseAttribute(const QualifiedName&, 320 void parseAttribute(const QualifiedName&,
318 const AtomicString&, 321 const AtomicString&,
319 const AtomicString&) override; 322 const AtomicString&) override;
320 void finishParsingChildren() final; 323 void finishParsingChildren() final;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 WebMediaPlayer::TrackId addVideoTrack(const WebString&, 382 WebMediaPlayer::TrackId addVideoTrack(const WebString&,
380 WebMediaPlayerClient::VideoTrackKind, 383 WebMediaPlayerClient::VideoTrackKind,
381 const WebString&, 384 const WebString&,
382 const WebString&, 385 const WebString&,
383 bool) final; 386 bool) final;
384 void removeVideoTrack(WebMediaPlayer::TrackId) final; 387 void removeVideoTrack(WebMediaPlayer::TrackId) final;
385 void addTextTrack(WebInbandTextTrack*) final; 388 void addTextTrack(WebInbandTextTrack*) final;
386 void removeTextTrack(WebInbandTextTrack*) final; 389 void removeTextTrack(WebInbandTextTrack*) final;
387 void mediaSourceOpened(WebMediaSource*) final; 390 void mediaSourceOpened(WebMediaSource*) final;
388 void requestSeek(double) final; 391 void requestSeek(double) final;
389 void remoteRouteAvailabilityChanged(bool) final; 392 void remoteRouteAvailabilityChanged(WebRemotePlaybackAvailability) final;
390 void connectedToRemoteDevice() final; 393 void connectedToRemoteDevice() final;
391 void disconnectedFromRemoteDevice() final; 394 void disconnectedFromRemoteDevice() final;
392 void cancelledRemotePlaybackRequest() final; 395 void cancelledRemotePlaybackRequest() final;
393 void remotePlaybackStarted() final; 396 void remotePlaybackStarted() final;
394 bool isAutoplayingMuted() final; 397 bool isAutoplayingMuted() final;
395 void requestReload(const WebURL&) final; 398 void requestReload(const WebURL&) final;
396 399
397 void loadTimerFired(TimerBase*); 400 void loadTimerFired(TimerBase*);
398 void progressEventTimerFired(TimerBase*); 401 void progressEventTimerFired(TimerBase*);
399 void playbackProgressTimerFired(TimerBase*); 402 void playbackProgressTimerFired(TimerBase*);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 // data has not been loaded since sending a "stalled" event 637 // data has not been loaded since sending a "stalled" event
635 bool m_sentStalledEvent : 1; 638 bool m_sentStalledEvent : 1;
636 639
637 bool m_ignorePreloadNone : 1; 640 bool m_ignorePreloadNone : 1;
638 641
639 bool m_textTracksVisible : 1; 642 bool m_textTracksVisible : 1;
640 bool m_shouldPerformAutomaticTrackSelection : 1; 643 bool m_shouldPerformAutomaticTrackSelection : 1;
641 644
642 bool m_tracksAreReady : 1; 645 bool m_tracksAreReady : 1;
643 bool m_processingPreferenceChange : 1; 646 bool m_processingPreferenceChange : 1;
644 bool m_remoteRoutesAvailable : 1;
645 bool m_playingRemotely : 1; 647 bool m_playingRemotely : 1;
646 // Whether this element is in overlay fullscreen mode. 648 // Whether this element is in overlay fullscreen mode.
647 bool m_inOverlayFullscreenVideo : 1; 649 bool m_inOverlayFullscreenVideo : 1;
648 650
649 TraceWrapperMember<AudioTrackList> m_audioTracks; 651 TraceWrapperMember<AudioTrackList> m_audioTracks;
650 TraceWrapperMember<VideoTrackList> m_videoTracks; 652 TraceWrapperMember<VideoTrackList> m_videoTracks;
651 TraceWrapperMember<TextTrackList> m_textTracks; 653 TraceWrapperMember<TextTrackList> m_textTracks;
652 HeapVector<Member<TextTrack>> m_textTracksWhenResourceSelectionBegan; 654 HeapVector<Member<TextTrack>> m_textTracksWhenResourceSelectionBegan;
653 655
654 Member<CueTimeline> m_cueTimeline; 656 Member<CueTimeline> m_cueTimeline;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 737
736 inline bool isHTMLMediaElement(const HTMLElement& element) { 738 inline bool isHTMLMediaElement(const HTMLElement& element) {
737 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 739 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
738 } 740 }
739 741
740 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 742 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
741 743
742 } // namespace blink 744 } // namespace blink
743 745
744 #endif // HTMLMediaElement_h 746 #endif // HTMLMediaElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698