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 28 matching lines...) Expand all Loading... |
39 #include "public/platform/WebMimeRegistry.h" | 39 #include "public/platform/WebMimeRegistry.h" |
40 | 40 |
41 namespace blink { | 41 namespace blink { |
42 class WebContentDecryptionModule; | 42 class WebContentDecryptionModule; |
43 class WebInbandTextTrack; | 43 class WebInbandTextTrack; |
44 class WebLayer; | 44 class WebLayer; |
45 } | 45 } |
46 | 46 |
47 namespace blink { | 47 namespace blink { |
48 | 48 |
49 #if ENABLE(WEB_AUDIO) | |
50 class AudioSourceProvider; | 49 class AudioSourceProvider; |
51 class AudioSourceProviderClient; | 50 class AudioSourceProviderClient; |
52 #endif | |
53 class AudioTrackList; | 51 class AudioTrackList; |
54 class ContentType; | 52 class ContentType; |
55 class Event; | 53 class Event; |
56 class ExceptionState; | 54 class ExceptionState; |
57 class HTMLSourceElement; | 55 class HTMLSourceElement; |
58 class HTMLTrackElement; | 56 class HTMLTrackElement; |
59 class KURL; | 57 class KURL; |
60 class MediaController; | 58 class MediaController; |
61 class MediaControls; | 59 class MediaControls; |
62 class MediaError; | 60 class MediaError; |
(...skipping 15 matching lines...) Expand all Loading... |
78 { | 76 { |
79 DEFINE_WRAPPERTYPEINFO(); | 77 DEFINE_WRAPPERTYPEINFO(); |
80 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElement); | 78 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElement); |
81 public: | 79 public: |
82 static blink::WebMimeRegistry::SupportsType supportsType(const ContentType&,
const String& keySystem = String()); | 80 static blink::WebMimeRegistry::SupportsType supportsType(const ContentType&,
const String& keySystem = String()); |
83 | 81 |
84 static void setMediaStreamRegistry(URLRegistry*); | 82 static void setMediaStreamRegistry(URLRegistry*); |
85 static bool isMediaStreamURL(const String& url); | 83 static bool isMediaStreamURL(const String& url); |
86 | 84 |
87 virtual void trace(Visitor*) OVERRIDE; | 85 virtual void trace(Visitor*) OVERRIDE; |
88 #if ENABLE(WEB_AUDIO) | |
89 void clearWeakMembers(Visitor*); | 86 void clearWeakMembers(Visitor*); |
90 #endif | |
91 blink::WebMediaPlayer* webMediaPlayer() const { return m_player ? m_player->
webMediaPlayer() : 0; } | 87 blink::WebMediaPlayer* webMediaPlayer() const { return m_player ? m_player->
webMediaPlayer() : 0; } |
92 | 88 |
93 virtual bool hasVideo() const { return false; } | 89 virtual bool hasVideo() const { return false; } |
94 bool hasAudio() const; | 90 bool hasAudio() const; |
95 | 91 |
96 bool supportsSave() const; | 92 bool supportsSave() const; |
97 | 93 |
98 blink::WebLayer* platformLayer() const; | 94 blink::WebLayer* platformLayer() const; |
99 | 95 |
100 enum DelayedActionType { | 96 enum DelayedActionType { |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 265 |
270 MediaControls* mediaControls() const; | 266 MediaControls* mediaControls() const; |
271 | 267 |
272 void sourceWasRemoved(HTMLSourceElement*); | 268 void sourceWasRemoved(HTMLSourceElement*); |
273 void sourceWasAdded(HTMLSourceElement*); | 269 void sourceWasAdded(HTMLSourceElement*); |
274 | 270 |
275 // ActiveDOMObject functions. | 271 // ActiveDOMObject functions. |
276 virtual bool hasPendingActivity() const OVERRIDE FINAL; | 272 virtual bool hasPendingActivity() const OVERRIDE FINAL; |
277 virtual void contextDestroyed() OVERRIDE FINAL; | 273 virtual void contextDestroyed() OVERRIDE FINAL; |
278 | 274 |
279 #if ENABLE(WEB_AUDIO) | |
280 AudioSourceProviderClient* audioSourceNode() { return m_audioSourceNode; } | 275 AudioSourceProviderClient* audioSourceNode() { return m_audioSourceNode; } |
281 void setAudioSourceNode(AudioSourceProviderClient*); | 276 void setAudioSourceNode(AudioSourceProviderClient*); |
282 | 277 |
283 AudioSourceProvider* audioSourceProvider(); | 278 AudioSourceProvider* audioSourceProvider(); |
284 #endif | |
285 | 279 |
286 enum InvalidURLAction { DoNothing, Complain }; | 280 enum InvalidURLAction { DoNothing, Complain }; |
287 bool isSafeToLoadURL(const KURL&, InvalidURLAction); | 281 bool isSafeToLoadURL(const KURL&, InvalidURLAction); |
288 | 282 |
289 MediaController* controller() const; | 283 MediaController* controller() const; |
290 void setController(PassRefPtrWillBeRawPtr<MediaController>); // Resets the M
ediaGroup and sets the MediaController. | 284 void setController(PassRefPtrWillBeRawPtr<MediaController>); // Resets the M
ediaGroup and sets the MediaController. |
291 | 285 |
292 void scheduleEvent(PassRefPtrWillBeRawPtr<Event>); | 286 void scheduleEvent(PassRefPtrWillBeRawPtr<Event>); |
293 | 287 |
294 // Returns the "effective media volume" value as specified in the HTML5 spec
. | 288 // Returns the "effective media volume" value as specified in the HTML5 spec
. |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 RefPtrWillBeMember<AudioTrackList> m_audioTracks; | 580 RefPtrWillBeMember<AudioTrackList> m_audioTracks; |
587 RefPtrWillBeMember<VideoTrackList> m_videoTracks; | 581 RefPtrWillBeMember<VideoTrackList> m_videoTracks; |
588 RefPtrWillBeMember<TextTrackList> m_textTracks; | 582 RefPtrWillBeMember<TextTrackList> m_textTracks; |
589 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel
ectionBegan; | 583 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel
ectionBegan; |
590 | 584 |
591 CueIntervalTree m_cueTree; | 585 CueIntervalTree m_cueTree; |
592 | 586 |
593 CueList m_currentlyActiveCues; | 587 CueList m_currentlyActiveCues; |
594 int m_ignoreTrackDisplayUpdate; | 588 int m_ignoreTrackDisplayUpdate; |
595 | 589 |
596 #if ENABLE(WEB_AUDIO) | |
597 // This is a weak reference, since m_audioSourceNode holds a reference to us
. | 590 // This is a weak reference, since m_audioSourceNode holds a reference to us
. |
598 // FIXME: Oilpan: Consider making this a strongly traced pointer with oilpan
where strong cycles are not a problem. | 591 // FIXME: Oilpan: Consider making this a strongly traced pointer with oilpan
where strong cycles are not a problem. |
599 GC_PLUGIN_IGNORE("http://crbug.com/404577") | 592 GC_PLUGIN_IGNORE("http://crbug.com/404577") |
600 RawPtrWillBeWeakMember<AudioSourceProviderClient> m_audioSourceNode; | 593 RawPtrWillBeWeakMember<AudioSourceProviderClient> m_audioSourceNode; |
601 #endif | |
602 | 594 |
603 friend class MediaController; | 595 friend class MediaController; |
604 RefPtrWillBeMember<MediaController> m_mediaController; | 596 RefPtrWillBeMember<MediaController> m_mediaController; |
605 | 597 |
606 friend class Internals; | 598 friend class Internals; |
607 friend class TrackDisplayUpdateScope; | 599 friend class TrackDisplayUpdateScope; |
608 | 600 |
609 static URLRegistry* s_mediaStreamRegistry; | 601 static URLRegistry* s_mediaStreamRegistry; |
610 }; | 602 }; |
611 | 603 |
(...skipping 19 matching lines...) Expand all Loading... |
631 inline bool isHTMLMediaElement(const HTMLElement& element) | 623 inline bool isHTMLMediaElement(const HTMLElement& element) |
632 { | 624 { |
633 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 625 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
634 } | 626 } |
635 | 627 |
636 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 628 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
637 | 629 |
638 } // namespace blink | 630 } // namespace blink |
639 | 631 |
640 #endif // HTMLMediaElement_h | 632 #endif // HTMLMediaElement_h |
OLD | NEW |