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

Unified Diff: Source/platform/graphics/media/MediaPlayer.h

Issue 302093011: Oilpan: move the MediaPlayer and MediaPlayerClient objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move DummyBase from WebCore to WTF Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/media/MediaPlayer.h
diff --git a/Source/platform/graphics/media/MediaPlayer.h b/Source/platform/graphics/media/MediaPlayer.h
index a4d7ccdcac9f7590937e4603dd97d7403416489c..064aad205a3ad71e121ef27dd83ac69169b168cc 100644
--- a/Source/platform/graphics/media/MediaPlayer.h
+++ b/Source/platform/graphics/media/MediaPlayer.h
@@ -28,6 +28,7 @@
#include "platform/PlatformExport.h"
#include "platform/graphics/GraphicsTypes3D.h"
+#include "platform/heap/Handle.h"
#include "public/platform/WebMediaPlayer.h"
#include "wtf/Forward.h"
#include "wtf/Noncopyable.h"
@@ -55,10 +56,12 @@ class TimeRanges;
typedef unsigned GC3Denum;
typedef int GC3Dint;
-class MediaPlayerClient {
+class MediaPlayerClient : public WillBeGarbageCollectedMixin {
sof 2014/06/02 11:36:28 The use of DummyBase<void> breaks the component bu
public:
virtual ~MediaPlayerClient() { }
+ virtual void trace(Visitor*) { }
+
// the network state has changed
virtual void mediaPlayerNetworkStateChanged() = 0;
@@ -97,12 +100,12 @@ public:
virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) = 0;
};
-typedef PassOwnPtr<MediaPlayer> (*CreateMediaEnginePlayer)(MediaPlayerClient*);
+typedef PassOwnPtrWillBeRawPtr<MediaPlayer> (*CreateMediaEnginePlayer)(MediaPlayerClient*);
-class PLATFORM_EXPORT MediaPlayer {
+class PLATFORM_EXPORT MediaPlayer : public WillBeGarbageCollectedMixin {
WTF_MAKE_NONCOPYABLE(MediaPlayer);
public:
- static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*);
+ static PassOwnPtrWillBeRawPtr<MediaPlayer> create(MediaPlayerClient*);
static void setMediaEngineCreateFunction(CreateMediaEnginePlayer);
static double invalidTime() { return -1.0; }
@@ -110,6 +113,10 @@ public:
MediaPlayer() { }
virtual ~MediaPlayer() { }
+ virtual void trace(Visitor*) { }
+
+ virtual void detach() = 0;
+
virtual void load(blink::WebMediaPlayer::LoadType, const String& url, blink::WebMediaPlayer::CORSMode) = 0;
virtual void play() = 0;

Powered by Google App Engine
This is Rietveld 408576698