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

Unified Diff: Source/core/html/HTMLMediaSource.h

Issue 360323002: MediaSource must use ref-counting to handle pending activity counting. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLMediaSource.h
diff --git a/Source/core/html/HTMLMediaSource.h b/Source/core/html/HTMLMediaSource.h
index 14baccb8e498df6f84c8592f6cf0b0da38bbf90b..eaf5883d8e58fe77611b8b3651c761bb9a43e524 100644
--- a/Source/core/html/HTMLMediaSource.h
+++ b/Source/core/html/HTMLMediaSource.h
@@ -32,6 +32,7 @@
#define HTMLMediaSource_h
#include "core/html/URLRegistry.h"
+#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
namespace blink {
@@ -43,13 +44,15 @@ namespace WebCore {
class HTMLMediaElement;
class TimeRanges;
-class HTMLMediaSource : public URLRegistrable {
+class HTMLMediaSource : public URLRegistrable, public WillBeGarbageCollectedMixin {
public:
static void setRegistry(URLRegistry*);
static HTMLMediaSource* lookup(const String& url) { return s_registry ? static_cast<HTMLMediaSource*>(s_registry->lookup(url)) : 0; }
+#if !ENABLE(OILPAN)
void ref() { refHTMLMediaSource(); }
void deref() { derefHTMLMediaSource(); }
+#endif
// Called when an HTMLMediaElement is attempting to attach to this object,
// and helps enforce attachment to at most one element at a time.
@@ -64,12 +67,16 @@ public:
virtual bool isClosed() const = 0;
virtual double duration() const = 0;
virtual PassRefPtr<TimeRanges> buffered() const = 0;
+#if !ENABLE(OILPAN)
virtual void refHTMLMediaSource() = 0;
virtual void derefHTMLMediaSource() = 0;
+#endif
// URLRegistrable
virtual URLRegistry& registry() const OVERRIDE { return *s_registry; }
+ virtual void trace(Visitor*) { }
+
private:
static URLRegistry* s_registry;
};

Powered by Google App Engine
This is Rietveld 408576698