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

Unified Diff: Source/web/WebMediaPlayerClientImpl.cpp

Issue 950813005: Change initDataType and sessionType to be enums (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: android compile issues Created 5 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
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | public/platform/WebContentDecryptionModuleSession.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebMediaPlayerClientImpl.cpp
diff --git a/Source/web/WebMediaPlayerClientImpl.cpp b/Source/web/WebMediaPlayerClientImpl.cpp
index c25c4a808fa1d8472480ac26cd1f7999ad3d7f9d..0044038de6f867cf606dc046e53eca18ea990b43 100644
--- a/Source/web/WebMediaPlayerClientImpl.cpp
+++ b/Source/web/WebMediaPlayerClientImpl.cpp
@@ -123,11 +123,27 @@ void WebMediaPlayerClientImpl::keyMessage(const WebString& keySystem, const WebS
HTMLMediaElementEncryptedMedia::keyMessage(mediaElement(), keySystem, sessionId, message, messageLength, defaultURL);
}
-void WebMediaPlayerClientImpl::encrypted(const WebString& initDataType, const unsigned char* initData, unsigned initDataLength)
+void WebMediaPlayerClientImpl::encrypted(WebEncryptedMediaInitDataType initDataType, const unsigned char* initData, unsigned initDataLength)
{
HTMLMediaElementEncryptedMedia::encrypted(mediaElement(), initDataType, initData, initDataLength);
}
+// FIXME: Remove this once Chromium updated to use enum type.
+void WebMediaPlayerClientImpl::encrypted(const WebString& initDataType, const unsigned char* initData, unsigned initDataLength)
+{
+ WebEncryptedMediaInitDataType newInitDataType;
+ if (initDataType == "cenc") {
+ newInitDataType = WebEncryptedMediaInitDataType::Cenc;
+ } else if (initDataType == "webm") {
+ newInitDataType = WebEncryptedMediaInitDataType::Webm;
+ } else if (initDataType == "keyids") {
+ newInitDataType = WebEncryptedMediaInitDataType::Keyids;
+ } else {
+ newInitDataType = WebEncryptedMediaInitDataType::Unknown;
+ }
+ HTMLMediaElementEncryptedMedia::encrypted(mediaElement(), newInitDataType, initData, initDataLength);
+}
+
void WebMediaPlayerClientImpl::didBlockPlaybackWaitingForKey()
{
HTMLMediaElementEncryptedMedia::didBlockPlaybackWaitingForKey(mediaElement());
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | public/platform/WebContentDecryptionModuleSession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698