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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.h

Issue 10836038: Call CDMWrapper from PpapiDecryptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add PP_DecryptionBuffer_Dev and update Decrypt() PPP call. Created 8 years, 4 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
Index: webkit/plugins/ppapi/ppapi_plugin_instance.h
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.h b/webkit/plugins/ppapi/ppapi_plugin_instance.h
index cffe58387c5d8480380859375b3a1923f3b11e4d..6466a1e12425222c976bb9b3fd7f64c6f968441c 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.h
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h
@@ -5,6 +5,7 @@
#ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
#define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
+#include <map>
#include <set>
#include <string>
#include <vector>
@@ -58,6 +59,11 @@ struct PP_Point;
class SkBitmap;
class TransportDIB;
+namespace media {
+class DecoderBuffer;
+class DecryptorClient;
+}
+
namespace WebKit {
class WebInputEvent;
class WebMouseEvent;
@@ -241,12 +247,14 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
// Provides access to PPP_ContentDecryptor_Dev.
typedef base::Callback<void(void*, int)> CDMStatusCB;
+ void SetDecryptClient(media::DecryptorClient* client);
+
bool GenerateKeyRequest(const std::string& key_system,
const std::string& init_data);
bool AddKey(const std::string& session_id,
const std::string& key);
bool CancelKeyRequest(const std::string& session_id);
- bool Decrypt(const std::string& encypted_block,
+ bool Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted_buffer,
const CDMStatusCB& callback);
bool DecryptAndDecode(const std::string& encypted_block,
const CDMStatusCB& callback);
@@ -442,7 +450,7 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
uint16_t system_error) OVERRIDE;
virtual void DeliverBlock(PP_Instance instance,
PP_Resource decrypted_block,
- PP_CompletionCallback callback) OVERRIDE;
+ uint32_t id) OVERRIDE;
virtual void DeliverFrame(PP_Instance instance,
PP_Resource decrypted_frame,
PP_CompletionCallback callback) OVERRIDE;
@@ -723,6 +731,11 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
// the pointer so we can re-send it later if we are reset to talk to NaCl.
scoped_refptr<PPB_URLLoader_Impl> document_loader_;
+ // We store the callback passed in from Decyrpt().
+ media::DecryptorClient* decryptor_client_;
+ uint64_t next_decryption_buffer_id_;
+ std::map<uint64_t, CDMStatusCB> cdm_status_cb_map_;
+
DISALLOW_COPY_AND_ASSIGN(PluginInstance);
};

Powered by Google App Engine
This is Rietveld 408576698