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

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: rebase only Created 6 years, 11 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 | « content/renderer/media/webcontentdecryptionmodulesession_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..93cab724256b85675df96502bc0e41af4eb1eb7e 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::initializeNewSession(
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) {
+ initializeNewSession(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
« no previous file with comments | « content/renderer/media/webcontentdecryptionmodulesession_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698