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

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

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 9 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
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef HTMLMediaElement_h 26 #ifndef HTMLMediaElement_h
27 #define HTMLMediaElement_h 27 #define HTMLMediaElement_h
28 28
29 #include "bindings/core/v8/ActiveScriptWrappable.h"
29 #include "bindings/core/v8/ScriptPromise.h" 30 #include "bindings/core/v8/ScriptPromise.h"
30 #include "core/CoreExport.h" 31 #include "core/CoreExport.h"
31 #include "core/dom/ActiveDOMObject.h" 32 #include "core/dom/ActiveDOMObject.h"
32 #include "core/dom/ExceptionCode.h" 33 #include "core/dom/ExceptionCode.h"
33 #include "core/events/GenericEventQueue.h" 34 #include "core/events/GenericEventQueue.h"
34 #include "core/html/AutoplayExperimentHelper.h" 35 #include "core/html/AutoplayExperimentHelper.h"
35 #include "core/html/HTMLElement.h" 36 #include "core/html/HTMLElement.h"
36 #include "core/html/track/TextTrack.h" 37 #include "core/html/track/TextTrack.h"
37 #include "platform/Supplementable.h" 38 #include "platform/Supplementable.h"
38 #include "platform/audio/AudioSourceProvider.h" 39 #include "platform/audio/AudioSourceProvider.h"
(...skipping 18 matching lines...) Expand all
57 class ScriptState; 58 class ScriptState;
58 class TextTrackContainer; 59 class TextTrackContainer;
59 class TextTrackList; 60 class TextTrackList;
60 class TimeRanges; 61 class TimeRanges;
61 class URLRegistry; 62 class URLRegistry;
62 class VideoTrackList; 63 class VideoTrackList;
63 class WebAudioSourceProvider; 64 class WebAudioSourceProvider;
64 class WebInbandTextTrack; 65 class WebInbandTextTrack;
65 class WebLayer; 66 class WebLayer;
66 67
67 class CORE_EXPORT HTMLMediaElement : public HTMLElement, public WillBeHeapSupple mentable<HTMLMediaElement>, public ActiveDOMObject, private WebMediaPlayerClient { 68 class CORE_EXPORT HTMLMediaElement : public HTMLElement, public WillBeHeapSupple mentable<HTMLMediaElement>, public ActiveScriptWrappable, public ActiveDOMObject , private WebMediaPlayerClient {
68 DEFINE_WRAPPERTYPEINFO(); 69 DEFINE_WRAPPERTYPEINFO();
69 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElement); 70 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElement);
70 WILL_BE_USING_PRE_FINALIZER(HTMLMediaElement, dispose); 71 WILL_BE_USING_PRE_FINALIZER(HTMLMediaElement, dispose);
71 public: 72 public:
72 static WebMimeRegistry::SupportsType supportsType(const ContentType&); 73 static WebMimeRegistry::SupportsType supportsType(const ContentType&);
73 74
74 enum class RecordMetricsBehavior { 75 enum class RecordMetricsBehavior {
75 DoNotRecord, 76 DoNotRecord,
76 DoRecord 77 DoRecord
77 }; 78 };
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // Note that this can be non-null even if there is no controls attribute. 225 // Note that this can be non-null even if there is no controls attribute.
225 MediaControls* mediaControls() const; 226 MediaControls* mediaControls() const;
226 227
227 // Notifies the media element that the media controls became visible, so 228 // Notifies the media element that the media controls became visible, so
228 // that text track layout may be updated to avoid overlapping them. 229 // that text track layout may be updated to avoid overlapping them.
229 void mediaControlsDidBecomeVisible(); 230 void mediaControlsDidBecomeVisible();
230 231
231 void sourceWasRemoved(HTMLSourceElement*); 232 void sourceWasRemoved(HTMLSourceElement*);
232 void sourceWasAdded(HTMLSourceElement*); 233 void sourceWasAdded(HTMLSourceElement*);
233 234
234 // ActiveDOMObject functions. 235 // ActiveScriptWrappable functions.
235 bool hasPendingActivity() const final; 236 bool hasPendingActivity() const final;
236 237
237 AudioSourceProviderClient* audioSourceNode() { return m_audioSourceNode; } 238 AudioSourceProviderClient* audioSourceNode() { return m_audioSourceNode; }
238 void setAudioSourceNode(AudioSourceProviderClient*); 239 void setAudioSourceNode(AudioSourceProviderClient*);
239 240
240 AudioSourceProvider& getAudioSourceProvider() { return m_audioSourceProvider ; } 241 AudioSourceProvider& getAudioSourceProvider() { return m_audioSourceProvider ; }
241 242
242 enum InvalidURLAction { DoNothing, Complain }; 243 enum InvalidURLAction { DoNothing, Complain };
243 bool isSafeToLoadURL(const KURL&, InvalidURLAction); 244 bool isSafeToLoadURL(const KURL&, InvalidURLAction);
244 245
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 inline bool isHTMLMediaElement(const HTMLElement& element) 645 inline bool isHTMLMediaElement(const HTMLElement& element)
645 { 646 {
646 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 647 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
647 } 648 }
648 649
649 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 650 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
650 651
651 } // namespace blink 652 } // namespace blink
652 653
653 #endif // HTMLMediaElement_h 654 #endif // HTMLMediaElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698