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

Unified Diff: Source/modules/mediasource/MediaSource.cpp

Issue 61603006: Remove MediaSourcePrivate/SourceBufferPrivate (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: assert null Created 7 years, 1 month 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
« no previous file with comments | « Source/core/platform/graphics/SourceBufferPrivate.h ('k') | Source/modules/mediasource/MediaSourceBase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediasource/MediaSource.cpp
diff --git a/Source/modules/mediasource/MediaSource.cpp b/Source/modules/mediasource/MediaSource.cpp
index 69d0789a9b0e1a75187f8d7d691d67291ea6bff7..091985ba36f60bf8abae51a9fabdfdf56c07de9c 100644
--- a/Source/modules/mediasource/MediaSource.cpp
+++ b/Source/modules/mediasource/MediaSource.cpp
@@ -36,14 +36,16 @@
#include "core/dom/ExceptionCode.h"
#include "core/events/GenericEventQueue.h"
#include "core/html/TimeRanges.h"
+#include "modules/mediasource/MediaSourceRegistry.h"
#include "platform/ContentType.h"
#include "platform/Logging.h"
-#include "core/platform/graphics/SourceBufferPrivate.h"
-#include "modules/mediasource/MediaSourceRegistry.h"
#include "platform/MIMETypeRegistry.h"
+#include "public/platform/WebSourceBuffer.h"
#include "wtf/Uint8Array.h"
#include "wtf/text/CString.h"
+using blink::WebSourceBuffer;
+
namespace WebCore {
PassRefPtr<MediaSource> MediaSource::create(ExecutionContext* context)
@@ -97,16 +99,16 @@ SourceBuffer* MediaSource::addSourceBuffer(const String& type, ExceptionState& e
// 5. Create a new SourceBuffer object and associated resources.
ContentType contentType(type);
Vector<String> codecs = contentType.codecs();
- OwnPtr<SourceBufferPrivate> sourceBufferPrivate = createSourceBufferPrivate(contentType.type(), codecs, es);
+ OwnPtr<WebSourceBuffer> webSourceBuffer = createWebSourceBuffer(contentType.type(), codecs, es);
- if (!sourceBufferPrivate) {
+ if (!webSourceBuffer) {
ASSERT(es.code() == NotSupportedError || es.code() == QuotaExceededError);
// 2. If type contains a MIME type that is not supported ..., then throw a NotSupportedError exception and abort these steps.
// 3. If the user agent can't handle any more SourceBuffer objects then throw a QuotaExceededError exception and abort these steps
return 0;
}
- RefPtr<SourceBuffer> buffer = SourceBuffer::create(sourceBufferPrivate.release(), this, asyncEventQueue());
+ RefPtr<SourceBuffer> buffer = SourceBuffer::create(webSourceBuffer.release(), this, asyncEventQueue());
// 6. Add the new object to sourceBuffers and fire a addsourcebuffer on that object.
m_sourceBuffers->add(buffer);
m_activeSourceBuffers->add(buffer);
« no previous file with comments | « Source/core/platform/graphics/SourceBufferPrivate.h ('k') | Source/modules/mediasource/MediaSourceBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698