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

Unified Diff: Source/platform/exported/WebContentDecryptionModuleSession.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/modules/encryptedmedia/MediaKeys.cpp ('k') | Source/web/WebMediaPlayerClientImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/exported/WebContentDecryptionModuleSession.cpp
diff --git a/Source/platform/exported/WebContentDecryptionModuleSession.cpp b/Source/platform/exported/WebContentDecryptionModuleSession.cpp
index 580c114905467077ffd16dd8a546c4a6d63980a9..cd957495e5c0fc1506e7d32ae5457516d0b5014d 100644
--- a/Source/platform/exported/WebContentDecryptionModuleSession.cpp
+++ b/Source/platform/exported/WebContentDecryptionModuleSession.cpp
@@ -32,6 +32,45 @@ WebContentDecryptionModuleSession::~WebContentDecryptionModuleSession()
{
}
+// FIXME: remove once Chromium overrides this method.
+void WebContentDecryptionModuleSession::initializeNewSession(WebEncryptedMediaInitDataType initDataType, const unsigned char* initData, size_t initDataLength, WebEncryptedMediaSessionType sessionType, WebContentDecryptionModuleResult result)
+{
+ WebString initDataTypeString;
+ switch (initDataType) {
+ case WebEncryptedMediaInitDataType::Cenc:
+ initDataTypeString = "cenc";
+ break;
+ case WebEncryptedMediaInitDataType::Keyids:
+ initDataTypeString = "keyids";
+ break;
+ case WebEncryptedMediaInitDataType::Webm:
+ initDataTypeString = "webm";
+ break;
+ case WebEncryptedMediaInitDataType::Unknown:
+ ASSERT_NOT_REACHED();
+ initDataTypeString = WebString();
+ break;
+ }
+
+ WebString sessionTypeString;
+ switch (sessionType) {
+ case WebEncryptedMediaSessionType::Temporary:
+ sessionTypeString = "temporary";
+ break;
+ case WebEncryptedMediaSessionType::PersistentLicense:
+ sessionTypeString = "persistent-license";
+ break;
+ case WebEncryptedMediaSessionType::PersistentReleaseMessage:
+ sessionTypeString = "persistent-release-message";
+ break;
+ case WebEncryptedMediaSessionType::Unknown:
+ sessionTypeString = WebString();
+ break;
+ }
+
+ initializeNewSession(initDataTypeString, initData, initDataLength, sessionTypeString, result);
+}
+
WebContentDecryptionModuleSession::Client::~Client()
{
}
« no previous file with comments | « Source/modules/encryptedmedia/MediaKeys.cpp ('k') | Source/web/WebMediaPlayerClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698