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

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

Issue 294053006: Oilpan: Use transition types for HTMLMediaElement and make AudioSourceProviderClient a GC mixin. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: weak member Created 6 years, 6 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 | Annotate | Revision Log
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
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void clearWeakMembers(Visitor*);
83 84
84 // Do not use player(). 85 // Do not use player().
85 // FIXME: Replace all uses with webMediaPlayer() and remove this API. 86 // FIXME: Replace all uses with webMediaPlayer() and remove this API.
86 MediaPlayer* player() const { return m_player.get(); } 87 MediaPlayer* player() const { return m_player.get(); }
87 blink::WebMediaPlayer* webMediaPlayer() const { return m_player ? m_player-> webMediaPlayer() : 0; } 88 blink::WebMediaPlayer* webMediaPlayer() const { return m_player ? m_player-> webMediaPlayer() : 0; }
88 89
89 virtual bool hasVideo() const { return false; } 90 virtual bool hasVideo() const { return false; }
90 bool hasAudio() const; 91 bool hasAudio() const;
91 92
92 bool supportsSave() const; 93 bool supportsSave() const;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 void loadResource(const KURL&, ContentType&, const String& keySystem); 362 void loadResource(const KURL&, ContentType&, const String& keySystem);
362 void startPlayerLoad(); 363 void startPlayerLoad();
363 void setPlayerPreload(); 364 void setPlayerPreload();
364 void startDelayedLoad(); 365 void startDelayedLoad();
365 blink::WebMediaPlayer::LoadType loadType() const; 366 blink::WebMediaPlayer::LoadType loadType() const;
366 void scheduleNextSourceChild(); 367 void scheduleNextSourceChild();
367 void loadNextSourceChild(); 368 void loadNextSourceChild();
368 void userCancelledLoad(); 369 void userCancelledLoad();
369 void clearMediaPlayer(int flags); 370 void clearMediaPlayer(int flags);
370 void clearMediaPlayerAndAudioSourceProviderClient(); 371 void clearMediaPlayerAndAudioSourceProviderClient();
372 void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking();
371 bool havePotentialSourceChild(); 373 bool havePotentialSourceChild();
372 void noneSupported(); 374 void noneSupported();
373 void mediaEngineError(PassRefPtrWillBeRawPtr<MediaError>); 375 void mediaEngineError(PassRefPtrWillBeRawPtr<MediaError>);
374 void cancelPendingEventsAndCallbacks(); 376 void cancelPendingEventsAndCallbacks();
375 void waitForSourceChange(); 377 void waitForSourceChange();
376 void prepareToPlay(); 378 void prepareToPlay();
377 379
378 KURL selectNextSourceChild(ContentType*, String* keySystem, InvalidURLAction ); 380 KURL selectNextSourceChild(ContentType*, String* keySystem, InvalidURLAction );
379 381
380 void mediaLoadingFailed(MediaPlayer::NetworkState); 382 void mediaLoadingFailed(MediaPlayer::NetworkState);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 RefPtrWillBeMember<TextTrackList> m_textTracks; 515 RefPtrWillBeMember<TextTrackList> m_textTracks;
514 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel ectionBegan; 516 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel ectionBegan;
515 517
516 CueIntervalTree m_cueTree; 518 CueIntervalTree m_cueTree;
517 519
518 CueList m_currentlyActiveCues; 520 CueList m_currentlyActiveCues;
519 int m_ignoreTrackDisplayUpdate; 521 int m_ignoreTrackDisplayUpdate;
520 522
521 #if ENABLE(WEB_AUDIO) 523 #if ENABLE(WEB_AUDIO)
522 // This is a weak reference, since m_audioSourceNode holds a reference to us . 524 // This is a weak reference, since m_audioSourceNode holds a reference to us .
523 AudioSourceProviderClient* m_audioSourceNode; 525 // FIXME: Oilpan: Consider making this a strongly traced pointer with oilpan where strong cycles are not a problem.
526 RawPtrWillBeWeakMember<AudioSourceProviderClient> m_audioSourceNode;
524 #endif 527 #endif
525 528
526 friend class MediaController; 529 friend class MediaController;
527 RefPtr<MediaController> m_mediaController; 530 RefPtr<MediaController> m_mediaController;
528 531
529 friend class Internals; 532 friend class Internals;
530 friend class TrackDisplayUpdateScope; 533 friend class TrackDisplayUpdateScope;
531 534
532 static URLRegistry* s_mediaStreamRegistry; 535 static URLRegistry* s_mediaStreamRegistry;
533 }; 536 };
(...skipping 25 matching lines...) Expand all
559 inline bool isHTMLMediaElement(const HTMLElement& element) 562 inline bool isHTMLMediaElement(const HTMLElement& element)
560 { 563 {
561 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 564 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
562 } 565 }
563 566
564 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 567 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
565 568
566 } //namespace 569 } //namespace
567 570
568 #endif 571 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | Source/core/html/HTMLMediaElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698