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

Unified Diff: media/base/media_keys.h

Issue 17289006: Separate CDM initialization from GenerateKeyRequest & remove key_system parameters. (Closed) Base URL: master
Patch Set: rebase only Created 7 years, 6 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 | « media/base/android/media_source_player_unittest.cc ('k') | media/crypto/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 633665e30d8b787e9aa69ef3a6c28faf97ba325e..51405545427ecc6d1afd057fbf6f731ec0070c90 100644
--- a/media/base/media_keys.h
+++ b/media/base/media_keys.h
@@ -37,28 +37,24 @@ class MEDIA_EXPORT MediaKeys {
MediaKeys();
virtual ~MediaKeys();
- // Generates a key request for the |key_system| with |type| and
- // |init_data| provided.
+ // Generates a key request with the |type| and |init_data| provided.
// Returns true if generating key request succeeded, false otherwise.
// Note: AddKey() and CancelKeyRequest() should only be called after
// GenerateKeyRequest() returns true.
- virtual bool GenerateKeyRequest(const std::string& key_system,
- const std::string& type,
+ virtual bool GenerateKeyRequest(const std::string& type,
const uint8* init_data,
int init_data_length) = 0;
- // Adds a |key| to the |key_system|. The |key| is not limited to a decryption
+ // Adds a |key| to the session. The |key| is not limited to a decryption
// key. It can be any data that the key system accepts, such as a license.
// If multiple calls of this function set different keys for the same
// key ID, the older key will be replaced by the newer key.
- virtual void AddKey(const std::string& key_system,
- const uint8* key, int key_length,
+ virtual void AddKey(const uint8* key, int key_length,
const uint8* init_data, int init_data_length,
const std::string& session_id) = 0;
// Cancels the key request specified by |session_id|.
- virtual void CancelKeyRequest(const std::string& key_system,
- const std::string& session_id) = 0;
+ virtual void CancelKeyRequest(const std::string& session_id) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(MediaKeys);
@@ -66,21 +62,17 @@ class MEDIA_EXPORT MediaKeys {
// Key event callbacks. See the spec for details:
// http://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1b/encrypted-media/encrypted-media.html#event-summary
-typedef base::Callback<void(const std::string& key_system,
- const std::string& session_id)> KeyAddedCB;
+typedef base::Callback<void(const std::string& session_id)> KeyAddedCB;
-typedef base::Callback<void(const std::string& key_system,
- const std::string& session_id,
+typedef base::Callback<void(const std::string& session_id,
media::MediaKeys::KeyError error_code,
int system_code)> KeyErrorCB;
-typedef base::Callback<void(const std::string& key_system,
- const std::string& session_id,
+typedef base::Callback<void(const std::string& session_id,
const std::string& message,
const std::string& default_url)> KeyMessageCB;
-typedef base::Callback<void(const std::string& key_system,
- const std::string& session_id,
+typedef base::Callback<void(const std::string& session_id,
const std::string& type,
scoped_ptr<uint8[]> init_data,
int init_data_size)> NeedKeyCB;
« no previous file with comments | « media/base/android/media_source_player_unittest.cc ('k') | media/crypto/aes_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698