| 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 d1a9404ee75bb34ba3a99825aa106fc39a00def0..2d72461cd7e7df66627d8cb60279e2a52cd2440e 100644
|
| --- a/webkit/plugins/ppapi/ppapi_plugin_instance.h
|
| +++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h
|
| @@ -10,6 +10,7 @@
|
| #include <vector>
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/callback.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| @@ -17,6 +18,8 @@
|
| #include "base/string16.h"
|
| #include "googleurl/src/gurl.h"
|
| #include "ppapi/c/dev/pp_cursor_type_dev.h"
|
| +#include "ppapi/c/dev/ppb_content_decryption_module_dev.h"
|
| +#include "ppapi/c/dev/ppp_content_decryption_module_dev.h"
|
| #include "ppapi/c/dev/ppp_printing_dev.h"
|
| #include "ppapi/c/dev/ppp_find_dev.h"
|
| #include "ppapi/c/dev/ppp_selection_dev.h"
|
| @@ -237,6 +240,18 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
|
|
|
| void Graphics3DContextLost();
|
|
|
| + // Implementation of PPP_ContentDecryptionModule_Dev.
|
| + typedef base::Callback<void(void*, int)> CDMStatusCB;
|
| + 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,
|
| + const CDMStatusCB& callback);
|
| + bool DecryptAndDecode(const std::string& encypted_block,
|
| + const CDMStatusCB& callback);
|
| +
|
| // There are 2 implementations of the fullscreen interface
|
| // PPB_FlashFullscreen is used by Pepper Flash.
|
| // PPB_Fullscreen is intended for other applications including NaCl.
|
| @@ -404,6 +419,32 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
|
| virtual PP_Var GetPluginInstanceURL(
|
| PP_Instance instance,
|
| PP_URLComponents_Dev* components) OVERRIDE;
|
| + virtual void NeedKey(PP_Instance instance,
|
| + PP_Var key_system,
|
| + PP_Var session_id,
|
| + PP_Resource init_data) OVERRIDE;
|
| + virtual void KeyAdded(PP_Instance instance,
|
| + PP_Var key_system,
|
| + PP_Var session_id) OVERRIDE;
|
| + virtual void KeyMessage(PP_Instance instance,
|
| + PP_Var key_system,
|
| + PP_Var session_id,
|
| + PP_Resource message,
|
| + PP_Var default_url) OVERRIDE;
|
| + virtual void KeyError(PP_Instance instance,
|
| + PP_Var key_system,
|
| + PP_Var session_id,
|
| + uint16_t media_error,
|
| + uint16_t system_error) OVERRIDE;
|
| + virtual void DeliverBlock(PP_Instance instance,
|
| + PP_Resource decrypted_block,
|
| + PP_CompletionCallback callback) OVERRIDE;
|
| + virtual void DeliverFrame(PP_Instance instance,
|
| + PP_Resource decrypted_frame,
|
| + PP_CompletionCallback callback) OVERRIDE;
|
| + virtual void DeliverSamples(PP_Instance instance,
|
| + PP_Resource decrypted_samples,
|
| + PP_CompletionCallback callback) OVERRIDE;
|
|
|
| private:
|
| // See the static Create functions above for creating PluginInstance objects.
|
| @@ -414,6 +455,7 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
|
| PluginModule* module,
|
| ::ppapi::PPP_Instance_Combined* instance_interface);
|
|
|
| + bool LoadContentDecryptionModuleInterface();
|
| bool LoadFindInterface();
|
| bool LoadInputEventInterface();
|
| bool LoadMessagingInterface();
|
| @@ -536,6 +578,7 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
|
| ResourceCreationImpl resource_creation_;
|
|
|
| // The plugin-provided interfaces.
|
| + const PPP_ContentDecryptionModule_Dev* plugin_decryption_interface_;
|
| const PPP_Find_Dev* plugin_find_interface_;
|
| const PPP_Messaging* plugin_messaging_interface_;
|
| const PPP_MouseLock* plugin_mouse_lock_interface_;
|
|
|