OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_CPP_DEV_CONTENT_DECRYPTION_MODULE_DEV_H_ |
| 6 #define PPAPI_CPP_DEV_CONTENT_DECRYPTION_MODULE_DEV_H_ |
| 7 |
| 8 #include "ppapi/c/dev/ppp_content_decryption_module_dev.h" |
| 9 #include "ppapi/cpp/instance_handle.h" |
| 10 |
| 11 namespace pp { |
| 12 |
| 13 class Instance; |
| 14 |
| 15 class ContentDecryptionModule_Dev { |
| 16 public: |
| 17 explicit ContentDecryptionModule_Dev(Instance* instance); |
| 18 virtual ~ContentDecryptionModule_Dev(); |
| 19 |
| 20 // PPP_ContentDecryptionModule_Dev functions exposed as virtual functions |
| 21 // for you to override. |
| 22 virtual bool GenerateKeyRequest(PP_Var key_system, |
| 23 PP_Resource init_data) = 0; |
| 24 |
| 25 virtual bool AddKey(PP_Var session_id, |
| 26 PP_Resource key) = 0; |
| 27 |
| 28 virtual bool CancelKeyRequest(PP_Var session_id) = 0; |
| 29 |
| 30 virtual bool Decrypt(PP_Resource encrypted_block, |
| 31 PP_CompletionCallback callback) = 0; |
| 32 |
| 33 virtual bool DecryptAndDecode(PP_Resource encrypted_block, |
| 34 PP_CompletionCallback callback) = 0; |
| 35 |
| 36 private: |
| 37 InstanceHandle associated_instance_; |
| 38 }; |
| 39 |
| 40 } // namespace pp |
| 41 |
| 42 #endif // PPAPI_CPP_DEV_CONTENT_DECRYPTION_MODULE_DEV_H_ |
OLD | NEW |