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

Unified Diff: Source/modules/encryptedmedia/MediaKeySession.cpp

Issue 606653006: bindings: Adds DOMArrayBuffer, etc. as thin wrappers for ArrayBuffer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 2 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
« no previous file with comments | « Source/modules/encryptedmedia/MediaKeySession.h ('k') | Source/modules/encryptedmedia/MediaKeys.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/encryptedmedia/MediaKeySession.cpp
diff --git a/Source/modules/encryptedmedia/MediaKeySession.cpp b/Source/modules/encryptedmedia/MediaKeySession.cpp
index 0cb30163c1c6ad5ab4e3a23589442aed9c971008..91960739bc52298fc0aa72f4ff5ce1094c70b127 100644
--- a/Source/modules/encryptedmedia/MediaKeySession.cpp
+++ b/Source/modules/encryptedmedia/MediaKeySession.cpp
@@ -30,6 +30,8 @@
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
#include "bindings/core/v8/ScriptState.h"
+#include "core/dom/DOMArrayBuffer.h"
+#include "core/dom/DOMArrayBufferView.h"
#include "core/dom/ExceptionCode.h"
#include "core/events/Event.h"
#include "core/events/GenericEventQueue.h"
@@ -48,8 +50,6 @@
#include "public/platform/WebString.h"
#include "public/platform/WebURL.h"
#include "wtf/ASCIICType.h"
-#include "wtf/ArrayBuffer.h"
-#include "wtf/ArrayBufferView.h"
#include <cmath>
#include <limits>
@@ -417,13 +417,13 @@ ScriptPromise MediaKeySession::closed(ScriptState* scriptState)
return m_closedPromise->promise(scriptState->world());
}
-ScriptPromise MediaKeySession::generateRequest(ScriptState* scriptState, const String& initDataType, ArrayBuffer* initData)
+ScriptPromise MediaKeySession::generateRequest(ScriptState* scriptState, const String& initDataType, DOMArrayBuffer* initData)
{
RefPtr<ArrayBuffer> initDataCopy = ArrayBuffer::create(initData->data(), initData->byteLength());
return generateRequestInternal(scriptState, initDataType, initDataCopy.release());
}
-ScriptPromise MediaKeySession::generateRequest(ScriptState* scriptState, const String& initDataType, ArrayBufferView* initData)
+ScriptPromise MediaKeySession::generateRequest(ScriptState* scriptState, const String& initDataType, DOMArrayBufferView* initData)
{
RefPtr<ArrayBuffer> initDataCopy = ArrayBuffer::create(initData->baseAddress(), initData->byteLength());
return generateRequestInternal(scriptState, initDataType, initDataCopy.release());
@@ -549,13 +549,13 @@ ScriptPromise MediaKeySession::load(ScriptState* scriptState, const String& sess
return promise;
}
-ScriptPromise MediaKeySession::update(ScriptState* scriptState, ArrayBuffer* response)
+ScriptPromise MediaKeySession::update(ScriptState* scriptState, DOMArrayBuffer* response)
{
RefPtr<ArrayBuffer> responseCopy = ArrayBuffer::create(response->data(), response->byteLength());
return updateInternal(scriptState, responseCopy.release());
}
-ScriptPromise MediaKeySession::update(ScriptState* scriptState, ArrayBufferView* response)
+ScriptPromise MediaKeySession::update(ScriptState* scriptState, DOMArrayBufferView* response)
{
RefPtr<ArrayBuffer> responseCopy = ArrayBuffer::create(response->baseAddress(), response->byteLength());
return updateInternal(scriptState, responseCopy.release());
@@ -878,7 +878,7 @@ void MediaKeySession::message(const unsigned char* message, size_t messageLength
MediaKeyMessageEventInit init;
init.bubbles = false;
init.cancelable = false;
- init.message = ArrayBuffer::create(static_cast<const void*>(message), messageLength);
+ init.message = DOMArrayBuffer::create(static_cast<const void*>(message), messageLength);
init.destinationURL = destinationURL.string();
RefPtrWillBeRawPtr<MediaKeyMessageEvent> event = MediaKeyMessageEvent::create(EventTypeNames::message, init);
« no previous file with comments | « Source/modules/encryptedmedia/MediaKeySession.h ('k') | Source/modules/encryptedmedia/MediaKeys.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698