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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 class HTMLMediaElement : public HTMLElement, public WillBeHeapSupplementable<HTM
LMediaElement>, public MediaPlayerClient, public ActiveDOMObject | 73 class HTMLMediaElement : public HTMLElement, public WillBeHeapSupplementable<HTM
LMediaElement>, public MediaPlayerClient, public ActiveDOMObject |
74 { | 74 { |
75 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElement); | 75 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElement); |
76 public: | 76 public: |
77 static blink::WebMimeRegistry::SupportsType supportsType(const ContentType&,
const String& keySystem = String()); | 77 static blink::WebMimeRegistry::SupportsType supportsType(const ContentType&,
const String& keySystem = String()); |
78 | 78 |
79 static void setMediaStreamRegistry(URLRegistry*); | 79 static void setMediaStreamRegistry(URLRegistry*); |
80 static bool isMediaStreamURL(const String& url); | 80 static bool isMediaStreamURL(const String& url); |
81 | 81 |
82 virtual void trace(Visitor*) OVERRIDE; | 82 virtual void trace(Visitor*) OVERRIDE; |
| 83 #if ENABLE(WEB_AUDIO) |
| 84 void clearWeakMembers(Visitor*); |
| 85 #endif |
83 | 86 |
84 // Do not use player(). | 87 // Do not use player(). |
85 // FIXME: Replace all uses with webMediaPlayer() and remove this API. | 88 // FIXME: Replace all uses with webMediaPlayer() and remove this API. |
86 MediaPlayer* player() const { return m_player.get(); } | 89 MediaPlayer* player() const { return m_player.get(); } |
87 blink::WebMediaPlayer* webMediaPlayer() const { return m_player ? m_player->
webMediaPlayer() : 0; } | 90 blink::WebMediaPlayer* webMediaPlayer() const { return m_player ? m_player->
webMediaPlayer() : 0; } |
88 | 91 |
89 virtual bool hasVideo() const { return false; } | 92 virtual bool hasVideo() const { return false; } |
90 bool hasAudio() const; | 93 bool hasAudio() const; |
91 | 94 |
92 bool supportsSave() const; | 95 bool supportsSave() const; |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 void selectMediaResource(); | 363 void selectMediaResource(); |
361 void loadResource(const KURL&, ContentType&, const String& keySystem); | 364 void loadResource(const KURL&, ContentType&, const String& keySystem); |
362 void startPlayerLoad(); | 365 void startPlayerLoad(); |
363 void setPlayerPreload(); | 366 void setPlayerPreload(); |
364 void startDelayedLoad(); | 367 void startDelayedLoad(); |
365 blink::WebMediaPlayer::LoadType loadType() const; | 368 blink::WebMediaPlayer::LoadType loadType() const; |
366 void scheduleNextSourceChild(); | 369 void scheduleNextSourceChild(); |
367 void loadNextSourceChild(); | 370 void loadNextSourceChild(); |
368 void userCancelledLoad(); | 371 void userCancelledLoad(); |
369 void clearMediaPlayer(int flags); | 372 void clearMediaPlayer(int flags); |
370 void clearMediaPlayerAndAudioSourceProviderClient(); | 373 void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); |
371 bool havePotentialSourceChild(); | 374 bool havePotentialSourceChild(); |
372 void noneSupported(); | 375 void noneSupported(); |
373 void mediaEngineError(PassRefPtrWillBeRawPtr<MediaError>); | 376 void mediaEngineError(PassRefPtrWillBeRawPtr<MediaError>); |
374 void cancelPendingEventsAndCallbacks(); | 377 void cancelPendingEventsAndCallbacks(); |
375 void waitForSourceChange(); | 378 void waitForSourceChange(); |
376 void prepareToPlay(); | 379 void prepareToPlay(); |
377 | 380 |
378 KURL selectNextSourceChild(ContentType*, String* keySystem, InvalidURLAction
); | 381 KURL selectNextSourceChild(ContentType*, String* keySystem, InvalidURLAction
); |
379 | 382 |
380 void mediaLoadingFailed(MediaPlayer::NetworkState); | 383 void mediaLoadingFailed(MediaPlayer::NetworkState); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 RefPtrWillBeMember<TextTrackList> m_textTracks; | 516 RefPtrWillBeMember<TextTrackList> m_textTracks; |
514 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel
ectionBegan; | 517 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel
ectionBegan; |
515 | 518 |
516 CueIntervalTree m_cueTree; | 519 CueIntervalTree m_cueTree; |
517 | 520 |
518 CueList m_currentlyActiveCues; | 521 CueList m_currentlyActiveCues; |
519 int m_ignoreTrackDisplayUpdate; | 522 int m_ignoreTrackDisplayUpdate; |
520 | 523 |
521 #if ENABLE(WEB_AUDIO) | 524 #if ENABLE(WEB_AUDIO) |
522 // This is a weak reference, since m_audioSourceNode holds a reference to us
. | 525 // This is a weak reference, since m_audioSourceNode holds a reference to us
. |
523 AudioSourceProviderClient* m_audioSourceNode; | 526 // FIXME: Oilpan: Consider making this a strongly traced pointer with oilpan
where strong cycles are not a problem. |
| 527 RawPtrWillBeWeakMember<AudioSourceProviderClient> m_audioSourceNode; |
524 #endif | 528 #endif |
525 | 529 |
526 friend class MediaController; | 530 friend class MediaController; |
527 RefPtrWillBeMember<MediaController> m_mediaController; | 531 RefPtrWillBeMember<MediaController> m_mediaController; |
528 | 532 |
529 friend class Internals; | 533 friend class Internals; |
530 friend class TrackDisplayUpdateScope; | 534 friend class TrackDisplayUpdateScope; |
531 | 535 |
532 static URLRegistry* s_mediaStreamRegistry; | 536 static URLRegistry* s_mediaStreamRegistry; |
533 }; | 537 }; |
(...skipping 25 matching lines...) Expand all Loading... |
559 inline bool isHTMLMediaElement(const HTMLElement& element) | 563 inline bool isHTMLMediaElement(const HTMLElement& element) |
560 { | 564 { |
561 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 565 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
562 } | 566 } |
563 | 567 |
564 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 568 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
565 | 569 |
566 } //namespace | 570 } //namespace |
567 | 571 |
568 #endif | 572 #endif |
OLD | NEW |