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

Unified Diff: third_party/WebKit/Source/modules/mediasource/SourceBufferAudioTrack.h

Issue 1658033002: Add SourceBuffer implementations of Audio/VideoTracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-media-tracks-to-blink
Patch Set: rebase Created 4 years, 10 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: third_party/WebKit/Source/modules/mediasource/SourceBufferAudioTrack.h
diff --git a/third_party/WebKit/Source/core/loader/PrerendererClient.h b/third_party/WebKit/Source/modules/mediasource/SourceBufferAudioTrack.h
similarity index 71%
copy from third_party/WebKit/Source/core/loader/PrerendererClient.h
copy to third_party/WebKit/Source/modules/mediasource/SourceBufferAudioTrack.h
index 10bc6cfaa9bce8060ec821da8c08ad011836be32..7938e50d72970af2aec56a0d8c2c4730dfda1452 100644
--- a/third_party/WebKit/Source/core/loader/PrerendererClient.h
+++ b/third_party/WebKit/Source/modules/mediasource/SourceBufferAudioTrack.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2016 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -26,34 +26,36 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
*/
-#ifndef PrerendererClient_h
-#define PrerendererClient_h
+#ifndef SourceBufferAudioTrack_h
+#define SourceBufferAudioTrack_h
-#include "core/CoreExport.h"
-#include "core/page/Page.h"
#include "platform/Supplementable.h"
+#include "wtf/Allocator.h"
namespace blink {
-class Page;
-class Prerender;
+class AudioTrack;
+class SourceBuffer;
-class CORE_EXPORT PrerendererClient : public WillBeHeapSupplement<Page> {
+class SourceBufferAudioTrack final : public GarbageCollectedFinalized<SourceBufferAudioTrack>, public HeapSupplement<AudioTrack> {
philipj_slow 2016/02/23 04:35:07 Does it need to be finalized?
servolk 2016/02/24 00:11:36 I guess not, so I've changed to a regulat GarbageC
servolk 2016/02/24 02:37:15 Actually, turns out this needs to be finalized, si
philipj_slow 2016/02/26 13:36:54 The build error was: In file included from ../../t
servolk 2016/02/27 01:03:45 Yes, I tried completely removing the destructor fi
philipj_slow 2016/03/02 11:20:44 I'm sure this is right then, but which are the non
+ USING_GARBAGE_COLLECTED_MIXIN(SourceBufferAudioTrack);
public:
- virtual void willAddPrerender(Prerender*) = 0;
+ static SourceBufferAudioTrack& from(AudioTrack&);
+ virtual ~SourceBufferAudioTrack();
+
+ static SourceBuffer* sourceBuffer(AudioTrack&);
+ DECLARE_VIRTUAL_TRACE();
+
+private:
static const char* supplementName();
- static PrerendererClient* from(Page*);
+ explicit SourceBufferAudioTrack(SourceBuffer*);
-protected:
- PrerendererClient() { }
+ WeakMember<SourceBuffer> m_sourceBuffer;
};
-CORE_EXPORT void providePrerendererClientTo(Page&, PrerendererClient*);
-
} // namespace blink
-#endif // PrerendererClient_h
+#endif

Powered by Google App Engine
This is Rietveld 408576698