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

Unified Diff: media/base/media_keys.h

Issue 555223004: Update MediaKeys interface for EME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 6 years, 3 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/pepper/content_decryptor_delegate.cc ('k') | media/cdm/aes_decryptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/media_keys.h
diff --git a/media/base/media_keys.h b/media/base/media_keys.h
index 063e54b1058d421a0ab89ba7dd1411cbc905619e..ec81571c1a2895aef72f77acd2dc09e855398eb2 100644
--- a/media/base/media_keys.h
+++ b/media/base/media_keys.h
@@ -14,6 +14,10 @@
#include "media/base/media_export.h"
#include "url/gurl.h"
+namespace base {
+class Time;
+}
+
namespace media {
class Decryptor;
@@ -72,6 +76,12 @@ class MEDIA_EXPORT MediaKeys {
MediaKeys();
virtual ~MediaKeys();
+ // Provides a server certificate to be used to encrypt messages to the
+ // license server.
+ virtual void SetServerCertificate(const uint8* certificate_data,
+ int certificate_data_length,
+ scoped_ptr<SimpleCdmPromise> promise) = 0;
+
// Creates a session with the |init_data_type|, |init_data| and |session_type|
// provided.
// Note: UpdateSession() and ReleaseSession() should only be called after
@@ -94,9 +104,19 @@ class MEDIA_EXPORT MediaKeys {
int response_length,
scoped_ptr<SimpleCdmPromise> promise) = 0;
- // Releases the session specified by |web_session_id|.
- virtual void ReleaseSession(const std::string& web_session_id,
- scoped_ptr<SimpleCdmPromise> promise) = 0;
+ // Closes the session specified by |web_session_id|.
+ virtual void CloseSession(const std::string& web_session_id,
+ scoped_ptr<SimpleCdmPromise> promise) = 0;
+
+ // Removes stored session data associated with the session specified by
+ // |web_session_id|.
+ virtual void RemoveSession(const std::string& web_session_id,
+ scoped_ptr<SimpleCdmPromise> promise) = 0;
+
+ // Retrieves the key IDs for keys in the session that the CDM knows are
+ // currently usable to decrypt media data.
+ virtual void GetUsableKeyIds(const std::string& web_session_id,
+ scoped_ptr<KeyIdsPromise> promise) = 0;
// Gets the Decryptor object associated with the MediaKeys. Returns NULL if
// no Decryptor object is associated. The returned object is only guaranteed
@@ -122,6 +142,14 @@ typedef base::Callback<void(const std::string& web_session_id,
uint32 system_code,
const std::string& error_message)> SessionErrorCB;
+typedef base::Callback<void(const std::string& web_session_id,
+ bool has_additional_usable_key)>
+ SessionKeysChangeCB;
+
+typedef base::Callback<void(const std::string& web_session_id,
+ const base::Time& new_expiry_time)>
+ SessionExpirationUpdateCB;
+
} // namespace media
#endif // MEDIA_BASE_MEDIA_KEYS_H_
« no previous file with comments | « content/renderer/pepper/content_decryptor_delegate.cc ('k') | media/cdm/aes_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698