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

Unified Diff: media/base/media_keys.h

Issue 17289006: Separate CDM initialization from GenerateKeyRequest & remove key_system parameters. (Closed) Base URL: master
Patch Set: minor changes 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 | « no previous file | media/crypto/aes_decryptor.h » ('j') | webkit/plugins/ppapi/content_decryptor_delegate.cc » ('J')
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 14789e23c1880211bcb0e9e453eaec1dfc07eb89..6f397662b877979bb9875f0888e382a146636dfe 100644
--- a/media/base/media_keys.h
+++ b/media/base/media_keys.h
@@ -36,28 +36,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);
@@ -65,21 +61,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 | « no previous file | media/crypto/aes_decryptor.h » ('j') | webkit/plugins/ppapi/content_decryptor_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698