| 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 89c5be1b2175dd52b6f6b48549a2ea746a8b618f..5755f1637586257c4359878f5aaa7d6245cb5547 100644
|
| --- a/webkit/plugins/ppapi/ppapi_plugin_instance.h
|
| +++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h
|
| @@ -17,6 +17,7 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/string16.h"
|
| #include "googleurl/src/gurl.h"
|
| +#include "media/base/decryptor.h"
|
| #include "ppapi/c/dev/pp_cursor_type_dev.h"
|
| #include "ppapi/c/dev/ppp_printing_dev.h"
|
| #include "ppapi/c/dev/ppp_find_dev.h"
|
| @@ -68,6 +69,11 @@ struct WebCursorInfo;
|
| struct WebPrintParams;
|
| }
|
|
|
| +namespace media {
|
| +class DecoderBuffer;
|
| +class DecryptorClient;
|
| +}
|
| +
|
| namespace ppapi {
|
| struct InputEventData;
|
| struct PPP_Instance_Combined;
|
| @@ -242,17 +248,19 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
|
|
|
| // Provides access to PPP_ContentDecryptor_Private.
|
| // TODO(tomfinegan): Move decryptor methods to delegate class.
|
| - typedef base::Callback<void(void*, int)> DecryptedDataCB;
|
| + void set_decrypt_client(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,
|
| const std::string& init_data);
|
| bool CancelKeyRequest(const std::string& session_id);
|
| - bool Decrypt(const base::StringPiece& encypted_block,
|
| - const DecryptedDataCB& callback);
|
| - bool DecryptAndDecode(const base::StringPiece& encypted_block,
|
| - const DecryptedDataCB& callback);
|
| + bool Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted_buffer,
|
| + const media::Decryptor::DecryptCB& decrypt_cb);
|
| + // TODO(xhwang): Update this when we need to support decrypt and decode.
|
| + bool DecryptAndDecode(
|
| + const scoped_refptr<media::DecoderBuffer>& encrypted_buffer,
|
| + const media::Decryptor::DecryptCB& decrypt_cb);
|
|
|
| // There are 2 implementations of the fullscreen interface
|
| // PPB_FlashFullscreen is used by Pepper Flash.
|
| @@ -728,6 +736,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_;
|
|
|
| + media::DecryptorClient* decryptor_client_;
|
| + int next_decryption_request_id_;
|
| + typedef std::map<int, media::Decryptor::DecryptCB> DecryptionCBMap;
|
| + DecryptionCBMap pending_decryption_cbs_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(PluginInstance);
|
| };
|
|
|
|
|