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

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

Issue 2767823002: Media Remoting: Add interstitial elements to media element shadow dom. (Closed)
Patch Set: Remove cast text message element. Not assuming remoting interstitial is media control. Created 3 years, 8 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 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 static bool isHLSURL(const KURL&); 97 static bool isHLSURL(const KURL&);
98 98
99 // If HTMLMediaElement is using MediaTracks (either placeholder or provided 99 // If HTMLMediaElement is using MediaTracks (either placeholder or provided
100 // by the page). 100 // by the page).
101 static bool mediaTracksEnabledInternally(); 101 static bool mediaTracksEnabledInternally();
102 102
103 // Notify the HTMLMediaElement that the media controls settings have changed 103 // Notify the HTMLMediaElement that the media controls settings have changed
104 // for the given document. 104 // for the given document.
105 static void onMediaControlsEnabledChange(Document*); 105 static void onMediaControlsEnabledChange(Document*);
106 106
107 // Assert the correct order of the children in shadow dom when DCHECK is on.
108 static void assertShadowRootChildren(ShadowRoot&);
mlamouri (slow - plz ping) 2017/04/07 13:18:32 Could this be `protected`?
xjz 2017/04/07 23:07:01 Done. Moved it to 'protected'.
109
107 DECLARE_VIRTUAL_TRACE(); 110 DECLARE_VIRTUAL_TRACE();
108 111
109 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 112 DECLARE_VIRTUAL_TRACE_WRAPPERS();
110 113
111 void clearWeakMembers(Visitor*); 114 void clearWeakMembers(Visitor*);
112 WebMediaPlayer* webMediaPlayer() const { return m_webMediaPlayer.get(); } 115 WebMediaPlayer* webMediaPlayer() const { return m_webMediaPlayer.get(); }
113 116
114 // Returns true if the loaded media has a video track. 117 // Returns true if the loaded media has a video track.
115 // Note that even an audio element can have video track in cases such as 118 // Note that even an audio element can have video track in cases such as
116 // <audio src="video.webm">, in which case this function will return true. 119 // <audio src="video.webm">, in which case this function will return true.
117 bool hasVideo() const; 120 bool hasVideo() const;
118 // Returns true if loaded media has an audio track. 121 // Returns true if loaded media has an audio track.
119 bool hasAudio() const; 122 bool hasAudio() const;
120 123
121 bool supportsSave() const; 124 bool supportsSave() const;
122 125
123 WebLayer* platformLayer() const; 126 WebLayer* platformLayer() const;
124 127
125 enum DelayedActionType { 128 enum DelayedActionType {
126 LoadMediaResource = 1 << 0, 129 LoadMediaResource = 1 << 0,
127 LoadTextTrackResource = 1 << 1 130 LoadTextTrackResource = 1 << 1
128 }; 131 };
129 void scheduleTextTrackResourceLoad(); 132 void scheduleTextTrackResourceLoad();
130 133
131 bool hasRemoteRoutes() const; 134 bool hasRemoteRoutes() const;
132 bool isPlayingRemotely() const { return m_playingRemotely; } 135 bool isPlayingRemotely() const { return m_playingRemotely; }
136 virtual bool isMediaRemotingStarted() const { return false; }
mlamouri (slow - plz ping) 2017/04/07 13:18:32 Instead of making this a virtual on HTMLMediaEleme
xjz 2017/04/07 23:07:01 Done.
133 137
134 // error state 138 // error state
135 MediaError* error() const; 139 MediaError* error() const;
136 140
137 // network state 141 // network state
138 void setSrc(const AtomicString&); 142 void setSrc(const AtomicString&);
139 const KURL& currentSrc() const { return m_currentSrc; } 143 const KURL& currentSrc() const { return m_currentSrc; }
140 void setSrcObject(MediaStreamDescriptor*); 144 void setSrcObject(MediaStreamDescriptor*);
141 MediaStreamDescriptor* getSrcObject() const { return m_srcObject.get(); } 145 MediaStreamDescriptor* getSrcObject() const { return m_srcObject.get(); }
142 146
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 void rejectScheduledPlayPromises(); 557 void rejectScheduledPlayPromises();
554 void rejectPlayPromises(ExceptionCode, const String&); 558 void rejectPlayPromises(ExceptionCode, const String&);
555 void rejectPlayPromisesInternal(ExceptionCode, const String&); 559 void rejectPlayPromisesInternal(ExceptionCode, const String&);
556 560
557 EnumerationHistogram& showControlsHistogram() const; 561 EnumerationHistogram& showControlsHistogram() const;
558 562
559 void onVisibilityChangedForAutoplay(bool isVisible); 563 void onVisibilityChangedForAutoplay(bool isVisible);
560 564
561 void viewportFillDebouncerTimerFired(TimerBase*); 565 void viewportFillDebouncerTimerFired(TimerBase*);
562 566
567 virtual bool isMediaRemotingDisabled() const { return false; }
568
563 TaskRunnerTimer<HTMLMediaElement> m_loadTimer; 569 TaskRunnerTimer<HTMLMediaElement> m_loadTimer;
564 TaskRunnerTimer<HTMLMediaElement> m_progressEventTimer; 570 TaskRunnerTimer<HTMLMediaElement> m_progressEventTimer;
565 TaskRunnerTimer<HTMLMediaElement> m_playbackProgressTimer; 571 TaskRunnerTimer<HTMLMediaElement> m_playbackProgressTimer;
566 TaskRunnerTimer<HTMLMediaElement> m_audioTracksTimer; 572 TaskRunnerTimer<HTMLMediaElement> m_audioTracksTimer;
567 TaskRunnerTimer<HTMLMediaElement> m_viewportFillDebouncerTimer; 573 TaskRunnerTimer<HTMLMediaElement> m_viewportFillDebouncerTimer;
568 TaskRunnerTimer<HTMLMediaElement> m_checkViewportIntersectionTimer; 574 TaskRunnerTimer<HTMLMediaElement> m_checkViewportIntersectionTimer;
569 575
570 Member<TimeRanges> m_playedTimeRanges; 576 Member<TimeRanges> m_playedTimeRanges;
571 Member<GenericEventQueue> m_asyncEventQueue; 577 Member<GenericEventQueue> m_asyncEventQueue;
572 578
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 769
764 inline bool isHTMLMediaElement(const HTMLElement& element) { 770 inline bool isHTMLMediaElement(const HTMLElement& element) {
765 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 771 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
766 } 772 }
767 773
768 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 774 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
769 775
770 } // namespace blink 776 } // namespace blink
771 777
772 #endif // HTMLMediaElement_h 778 #endif // HTMLMediaElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698