Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: ppapi/cpp/dev/content_decryptor_dev.h

Issue 10545036: Add PPAPI decryptor interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert change to ppapi_tests.gypi. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_DECRYPTOR_DEV_H_
6 #define PPAPI_CPP_DEV_CONTENT_DECRYPTOR_DEV_H_
7
8 #include "ppapi/c/dev/ppb_content_decryptor_dev.h"
9 #include "ppapi/c/dev/ppp_content_decryptor_dev.h"
10 #include "ppapi/cpp/instance_handle.h"
11
12 namespace pp {
13
14 class Instance;
15
16 class ContentDecryptor_Dev {
17 public:
18 explicit ContentDecryptor_Dev(Instance* instance);
19 virtual ~ContentDecryptor_Dev();
20
21 // PPP_ContentDecryptor_Dev functions exposed as virtual functions
22 // for you to override.
23 virtual bool GenerateKeyRequest(PP_Var key_system, // String.
dmichael (off chromium) 2012/07/31 03:36:31 Why not pp::Var instead of PP_Var?
Tom Finegan 2012/08/01 04:19:22 For the PPP methods I thought I had to use the C i
dmichael (off chromium) 2012/08/08 03:38:10 We convert the params to appropriate C++ types whe
24 PP_Resource init_data) = 0; // PPB_Buffer.
dmichael (off chromium) 2012/07/31 03:36:31 pp::Buffer_Dev? (unless you go with ArrayBuffer, w
Tom Finegan 2012/08/01 04:19:22 Using PP_Var now.
25
26 virtual bool AddKey(PP_Var session_id, // String.
27 PP_Resource key) = 0; // PPB_Buffer.
28
29 virtual bool CancelKeyRequest(PP_Var session_id) = 0; // String.
30
31 virtual bool Decrypt(PP_Resource encrypted_block, // PPB_Buffer.
32 PP_CompletionCallback callback) = 0;
dmichael (off chromium) 2012/07/31 03:36:31 Maybe pp::CompletionCallback, depending on what th
Tom Finegan 2012/08/01 04:19:22 Same as first comment response in this file.
33
34 virtual bool DecryptAndDecode(PP_Resource encrypted_block, // PPB_Buffer.
35 PP_CompletionCallback callback) = 0;
36
37 // PPB_ContentDecryptor_Dev methods for passing data from the decryptor to the
38 // browser.
39 void NeedKey(PP_Var key_system, // String.
40 PP_Var session_id, // String.
41 PP_Resource init_data); // PPB_Buffer.
42
43 void KeyAdded(PP_Var key_system, // String.
44 PP_Var session_id); // String.
45
46 void KeyMessage(PP_Var key_system, // String.
47 PP_Var session_id, // String.
48 PP_Resource message, // PPB_Buffer.
49 PP_Var default_url); // String.
50
51 void KeyError(PP_Var key_system, // String.
52 PP_Var session_id, // String.
53 uint16_t media_error,
54 uint16_t system_error);
55
56 void DeliverBlock(PP_Resource decrypted_block, // PPB_Buffer.
57 PP_CompletionCallback callback);
58
59 void DeliverFrame(PP_Resource decrypted_frame, // PPB_Buffer.
60 PP_CompletionCallback callback);
61
62 void DeliverSamples(PP_Resource decrypted_samples, // PPB_Buffer.
63 PP_CompletionCallback callback);
64
65 private:
66 InstanceHandle associated_instance_;
67 };
68
69 } // namespace pp
70
71 #endif // PPAPI_CPP_DEV_CONTENT_DECRYPTOR_DEV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698