OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_CPP_DEV_CONTENT_DECRYPTOR_DEV_H_ | 5 #ifndef PPAPI_CPP_DEV_CONTENT_DECRYPTOR_DEV_H_ |
6 #define PPAPI_CPP_DEV_CONTENT_DECRYPTOR_DEV_H_ | 6 #define PPAPI_CPP_DEV_CONTENT_DECRYPTOR_DEV_H_ |
7 | 7 |
8 #include "ppapi/c/dev/ppb_content_decryptor_dev.h" | 8 #include "ppapi/c/dev/ppb_content_decryptor_dev.h" |
9 #include "ppapi/c/dev/ppp_content_decryptor_dev.h" | 9 #include "ppapi/c/dev/ppp_content_decryptor_dev.h" |
10 #include "ppapi/cpp/instance_handle.h" | 10 #include "ppapi/cpp/instance_handle.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // PPP_ContentDecryptor_Dev functions exposed as virtual functions | 21 // PPP_ContentDecryptor_Dev functions exposed as virtual functions |
22 // for you to override. | 22 // for you to override. |
23 virtual bool GenerateKeyRequest(PP_Var key_system, // String. | 23 virtual bool GenerateKeyRequest(PP_Var key_system, // String. |
24 PP_Resource init_data) = 0; // PPB_Buffer. | 24 PP_Resource init_data) = 0; // PPB_Buffer. |
25 | 25 |
26 virtual bool AddKey(PP_Var session_id, // String. | 26 virtual bool AddKey(PP_Var session_id, // String. |
27 PP_Resource key) = 0; // PPB_Buffer. | 27 PP_Resource key) = 0; // PPB_Buffer. |
28 | 28 |
29 virtual bool CancelKeyRequest(PP_Var session_id) = 0; // String. | 29 virtual bool CancelKeyRequest(PP_Var session_id) = 0; // String. |
30 | 30 |
31 virtual bool Decrypt(PP_Resource encrypted_block, // PPB_Buffer. | 31 virtual bool Decrypt(const PP_DecryptionBuffer_Dev& encrypted_buffer) = 0; |
32 PP_CompletionCallback callback) = 0; | |
33 | 32 |
34 virtual bool DecryptAndDecode(PP_Resource encrypted_block, // PPB_Buffer. | 33 virtual bool DecryptAndDecode(PP_Resource encrypted_block, // PPB_Buffer. |
35 PP_CompletionCallback callback) = 0; | 34 PP_CompletionCallback callback) = 0; |
36 | 35 |
37 // PPB_ContentDecryptor_Dev methods for passing data from the decryptor to the | 36 // PPB_ContentDecryptor_Dev methods for passing data from the decryptor to the |
38 // browser. | 37 // browser. |
39 void NeedKey(PP_Var key_system, // String. | 38 void NeedKey(PP_Var key_system, // String. |
40 PP_Var session_id, // String. | 39 PP_Var session_id, // String. |
41 PP_Resource init_data); // PPB_Buffer. | 40 PP_Resource init_data); // PPB_Buffer. |
42 | 41 |
43 void KeyAdded(PP_Var key_system, // String. | 42 void KeyAdded(PP_Var key_system, // String. |
44 PP_Var session_id); // String. | 43 PP_Var session_id); // String. |
45 | 44 |
46 void KeyMessage(PP_Var key_system, // String. | 45 void KeyMessage(PP_Var key_system, // String. |
47 PP_Var session_id, // String. | 46 PP_Var session_id, // String. |
48 PP_Resource message, // PPB_Buffer. | 47 PP_Resource message, // PPB_Buffer. |
49 PP_Var default_url); // String. | 48 PP_Var default_url); // String. |
50 | 49 |
51 void KeyError(PP_Var key_system, // String. | 50 void KeyError(PP_Var key_system, // String. |
52 PP_Var session_id, // String. | 51 PP_Var session_id, // String. |
53 uint16_t media_error, | 52 uint16_t media_error, |
54 uint16_t system_error); | 53 uint16_t system_error); |
55 | 54 |
56 void DeliverBlock(PP_Resource decrypted_block, // PPB_Buffer. | 55 void DeliverBlock(PP_Resource decrypted_block, // PPB_Buffer. |
57 PP_CompletionCallback callback); | 56 uint32_t id); |
58 | 57 |
59 void DeliverFrame(PP_Resource decrypted_frame, // PPB_Buffer. | 58 void DeliverFrame(PP_Resource decrypted_frame, // PPB_Buffer. |
60 PP_CompletionCallback callback); | 59 PP_CompletionCallback callback); |
61 | 60 |
62 void DeliverSamples(PP_Resource decrypted_samples, // PPB_Buffer. | 61 void DeliverSamples(PP_Resource decrypted_samples, // PPB_Buffer. |
63 PP_CompletionCallback callback); | 62 PP_CompletionCallback callback); |
64 | 63 |
65 private: | 64 private: |
66 InstanceHandle associated_instance_; | 65 InstanceHandle associated_instance_; |
67 }; | 66 }; |
68 | 67 |
69 } // namespace pp | 68 } // namespace pp |
70 | 69 |
71 #endif // PPAPI_CPP_DEV_CONTENT_DECRYPTOR_DEV_H_ | 70 #endif // PPAPI_CPP_DEV_CONTENT_DECRYPTOR_DEV_H_ |
OLD | NEW |