Index: ppapi/cpp/dev/content_decryption_module_dev.h |
diff --git a/ppapi/cpp/dev/content_decryption_module_dev.h b/ppapi/cpp/dev/content_decryption_module_dev.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ba1e463e440eddd921c93e3ba35dfb9c18a56988 |
--- /dev/null |
+++ b/ppapi/cpp/dev/content_decryption_module_dev.h |
@@ -0,0 +1,42 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef PPAPI_CPP_DEV_CONTENT_DECRYPTION_MODULE_DEV_H_ |
+#define PPAPI_CPP_DEV_CONTENT_DECRYPTION_MODULE_DEV_H_ |
+ |
+#include "ppapi/c/dev/ppp_content_decryption_module_dev.h" |
+#include "ppapi/cpp/instance_handle.h" |
+ |
+namespace pp { |
+ |
+class Instance; |
+ |
+class ContentDecryptionModule_Dev { |
+ public: |
+ explicit ContentDecryptionModule_Dev(Instance* instance); |
+ virtual ~ContentDecryptionModule_Dev(); |
+ |
+ // PPP_ContentDecryptionModule_Dev functions exposed as virtual functions |
+ // for you to override. |
+ virtual bool GenerateKeyRequest(PP_Var key_system, |
+ PP_Resource init_data) = 0; |
+ |
+ virtual bool AddKey(PP_Var session_id, |
+ PP_Resource key) = 0; |
+ |
+ virtual bool CancelKeyRequest(PP_Var session_id) = 0; |
+ |
+ virtual bool Decrypt(PP_Resource encrypted_block, |
+ PP_CompletionCallback callback) = 0; |
+ |
+ virtual bool DecryptAndDecode(PP_Resource encrypted_block, |
+ PP_CompletionCallback callback) = 0; |
+ |
+ private: |
+ InstanceHandle associated_instance_; |
+}; |
+ |
+} // namespace pp |
+ |
+#endif // PPAPI_CPP_DEV_CONTENT_DECRYPTION_MODULE_DEV_H_ |