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

Unified Diff: webkit/media/crypto/ppapi_decryptor.h

Issue 15772012: Separate MediaKeys interface from Decryptor interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android Created 7 years, 7 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 | « webkit/media/crypto/ppapi/clear_key_cdm.cc ('k') | webkit/media/crypto/ppapi_decryptor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/crypto/ppapi_decryptor.h
diff --git a/webkit/media/crypto/ppapi_decryptor.h b/webkit/media/crypto/ppapi_decryptor.h
index aad28c66b9a396d97449346cefcc4ee21c7ea8a5..082773284402b520240e72b115791d8d4b95f054 100644
--- a/webkit/media/crypto/ppapi_decryptor.h
+++ b/webkit/media/crypto/ppapi_decryptor.h
@@ -10,6 +10,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "media/base/decryptor.h"
+#include "media/base/media_keys.h"
#include "media/base/video_decoder_config.h"
namespace base {
@@ -28,7 +29,7 @@ namespace webkit_media {
// PpapiDecryptor implements media::Decryptor and forwards all calls to the
// PluginInstance.
// This class should always be created & destroyed on the main renderer thread.
-class PpapiDecryptor : public media::Decryptor {
+class PpapiDecryptor : public media::MediaKeys, public media::Decryptor {
public:
PpapiDecryptor(
const scoped_refptr<webkit::ppapi::PluginInstance>& plugin_instance,
@@ -38,19 +39,20 @@ class PpapiDecryptor : public media::Decryptor {
const media::NeedKeyCB& need_key_cb);
virtual ~PpapiDecryptor();
- // media::Decryptor implementation.
+ // media::MediaKeys implementation.
virtual bool GenerateKeyRequest(const std::string& key_system,
const std::string& type,
const uint8* init_data,
int init_data_length) OVERRIDE;
virtual void AddKey(const std::string& key_system,
- const uint8* key,
- int key_length,
- const uint8* init_data,
- int init_data_length,
+ const uint8* key, int key_length,
+ const uint8* init_data, int init_data_length,
const std::string& session_id) OVERRIDE;
virtual void CancelKeyRequest(const std::string& key_system,
const std::string& session_id) OVERRIDE;
+
+ // media::Decryptor implementation.
+ virtual media::MediaKeys* GetMediaKeys() OVERRIDE;
virtual void RegisterNewKeyCB(StreamType stream_type,
const NewKeyCB& key_added_cb) OVERRIDE;
virtual void Decrypt(StreamType stream_type,
@@ -80,7 +82,7 @@ class PpapiDecryptor : public media::Decryptor {
void KeyAdded(const std::string& key_system, const std::string& session_id);
void KeyError(const std::string& key_system,
const std::string& session_id,
- media::Decryptor::KeyError error_code,
+ media::MediaKeys::KeyError error_code,
int system_code);
void KeyMessage(const std::string& key_system,
const std::string& session_id,
« no previous file with comments | « webkit/media/crypto/ppapi/clear_key_cdm.cc ('k') | webkit/media/crypto/ppapi_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698