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

Unified Diff: Source/core/html/MediaController.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: Have MediaController weakly track its media elements 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/core/html/MediaController.h
diff --git a/Source/core/html/MediaController.h b/Source/core/html/MediaController.h
index cba47eaa05bcf9ec396cabfd505e8525fd97627e..462dad711abdd694c7a32b572f9a46ccbaf5e502 100644
--- a/Source/core/html/MediaController.h
+++ b/Source/core/html/MediaController.h
@@ -29,9 +29,9 @@
#include "bindings/v8/ScriptWrappable.h"
#include "core/events/EventTarget.h"
#include "core/html/HTMLMediaElement.h"
+#include "wtf/LinkedHashSet.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
-#include "wtf/Vector.h"
namespace WebCore {
@@ -44,7 +44,7 @@ class MediaController FINAL : public RefCountedWillBeRefCountedGarbageCollected<
REFCOUNTED_EVENT_TARGET(MediaController);
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaController);
public:
- static PassRefPtr<MediaController> create(ExecutionContext*);
+ static PassRefPtrWillBeRawPtr<MediaController> create(ExecutionContext*);
virtual ~MediaController();
void addMediaElement(HTMLMediaElement*);
@@ -86,6 +86,8 @@ public:
void clearExecutionContext() { m_executionContext = 0; }
+ virtual void trace(Visitor*) OVERRIDE;
+
private:
MediaController(ExecutionContext*);
void reportControllerState();
@@ -106,7 +108,8 @@ private:
friend class HTMLMediaElement;
friend class MediaControllerEventListener;
- Vector<HTMLMediaElement*> m_mediaElements;
+ typedef WillBeHeapLinkedHashSet<RawPtrWillBeWeakMember<HTMLMediaElement> > MediaElementSequence;
sof 2014/06/03 08:17:05 To be able to weakly refer to a registered sequenc
+ MediaElementSequence m_mediaElements;
bool m_paused;
double m_defaultPlaybackRate;
double m_volume;

Powered by Google App Engine
This is Rietveld 408576698