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

Unified Diff: content/renderer/media/webcontentdecryptionmodulesession_impl.cc

Issue 101693009: Update WebContentDecryptionModuleSessionImpl to the latest EME spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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: content/renderer/media/webcontentdecryptionmodulesession_impl.cc
diff --git a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc
index bc74d35dc6adaa487319d0c284ec6d6ca721deff..02fde202205bec41bb2d9bfd43d0d5f98f3ac280 100644
--- a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc
+++ b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc
@@ -31,7 +31,7 @@ blink::WebString WebContentDecryptionModuleSessionImpl::sessionId() const {
return web_session_id_;
}
-void WebContentDecryptionModuleSessionImpl::generateKeyRequest(
+void WebContentDecryptionModuleSessionImpl::initialize(
const blink::WebString& mime_type,
const uint8* init_data, size_t init_data_length) {
// TODO(ddorwin): Guard against this in supported types check and remove this.
@@ -46,16 +46,26 @@ void WebContentDecryptionModuleSessionImpl::generateKeyRequest(
session_id_, UTF16ToASCII(mime_type), init_data, init_data_length);
}
+void WebContentDecryptionModuleSessionImpl::generateKeyRequest(
+ const blink::WebString& mime_type,
+ const uint8* init_data, size_t init_data_length) {
+ initialize(mime_type, init_data, init_data_length);
+}
+
void WebContentDecryptionModuleSessionImpl::update(const uint8* response,
size_t response_length) {
DCHECK(response);
media_keys_->UpdateSession(session_id_, response, response_length);
}
-void WebContentDecryptionModuleSessionImpl::close() {
+void WebContentDecryptionModuleSessionImpl::release() {
media_keys_->ReleaseSession(session_id_);
}
+void WebContentDecryptionModuleSessionImpl::close() {
+ release();
+}
+
void WebContentDecryptionModuleSessionImpl::OnSessionCreated(
const std::string& web_session_id) {
// Due to heartbeat messages, OnSessionCreated() can get called multiple

Powered by Google App Engine
This is Rietveld 408576698