summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-26 19:32:50 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-26 19:32:50 +0000
commit8c71647a64faa680adce4c4c1415004f625580aa (patch)
tree9a1b1f095116b137cfdbdb0b80ecb7d7b382576e /ppapi
parent913e3018b2c564f159c9a0b8119595f0daa8847a (diff)
downloadchromium_src-8c71647a64faa680adce4c4c1415004f625580aa.zip
chromium_src-8c71647a64faa680adce4c4c1415004f625580aa.tar.gz
chromium_src-8c71647a64faa680adce4c4c1415004f625580aa.tar.bz2
IDL: Autogen thunk: PPB_ContentDecryptor_Private.
Automatically generate thunk for the PPB_ContentDecryptor_Private interface. BUG= Review URL: https://chromiumcodereview.appspot.com/12334079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184699 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/api/private/ppb_content_decryptor_private.idl3
-rwxr-xr-xppapi/generators/idl_thunk.py5
-rw-r--r--ppapi/thunk/ppb_content_decryptor_private_thunk.cc80
3 files changed, 55 insertions, 33 deletions
diff --git a/ppapi/api/private/ppb_content_decryptor_private.idl b/ppapi/api/private/ppb_content_decryptor_private.idl
index 36dbb53..e18afef 100644
--- a/ppapi/api/private/ppb_content_decryptor_private.idl
+++ b/ppapi/api/private/ppb_content_decryptor_private.idl
@@ -8,6 +8,9 @@
* interface. Note: This is a special interface, only to be used for Content
* Decryption Modules, not normal plugins.
*/
+
+[generate_thunk]
+
label Chrome {
M24 = 0.6
};
diff --git a/ppapi/generators/idl_thunk.py b/ppapi/generators/idl_thunk.py
index a754e3f..1f99658 100755
--- a/ppapi/generators/idl_thunk.py
+++ b/ppapi/generators/idl_thunk.py
@@ -429,7 +429,10 @@ class TGen(GeneratorByFile):
thunk_type = '_'.join((node.GetName(), version))
version_list.append((thunk_type, thunk_name))
- out.Write('const %s %s = {\n' % (thunk_type, thunk_name))
+ declare_line = 'const %s %s = {' % (thunk_type, thunk_name)
+ if len(declare_line) > 80:
+ declare_line = 'const %s\n %s = {' % (thunk_type, thunk_name)
+ out.Write('%s\n' % declare_line)
generated_functions = []
members = node.GetListOf('Member')
for child in members:
diff --git a/ppapi/thunk/ppb_content_decryptor_private_thunk.cc b/ppapi/thunk/ppb_content_decryptor_private_thunk.cc
index 2c0d08a..c6417b4 100644
--- a/ppapi/thunk/ppb_content_decryptor_private_thunk.cc
+++ b/ppapi/thunk/ppb_content_decryptor_private_thunk.cc
@@ -2,9 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// From private/ppb_content_decryptor_private.idl,
+// modified Mon Feb 25 14:49:36 2013.
+
+#include "ppapi/c/pp_errors.h"
#include "ppapi/c/private/ppb_content_decryptor_private.h"
+#include "ppapi/shared_impl/tracked_callback.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_instance_api.h"
+#include "ppapi/thunk/resource_creation_api.h"
#include "ppapi/thunk/thunk.h"
namespace ppapi {
@@ -13,52 +19,58 @@ namespace thunk {
namespace {
void NeedKey(PP_Instance instance,
- PP_Var key_system,
- PP_Var session_id,
- PP_Var init_data) {
+ struct PP_Var key_system,
+ struct PP_Var session_id,
+ struct PP_Var init_data) {
EnterInstance enter(instance);
if (enter.succeeded())
enter.functions()->NeedKey(instance, key_system, session_id, init_data);
}
void KeyAdded(PP_Instance instance,
- PP_Var key_system,
- PP_Var session_id) {
+ struct PP_Var key_system,
+ struct PP_Var session_id) {
EnterInstance enter(instance);
if (enter.succeeded())
enter.functions()->KeyAdded(instance, key_system, session_id);
}
void KeyMessage(PP_Instance instance,
- PP_Var key_system,
- PP_Var session_id,
- PP_Var message,
- PP_Var default_url) {
+ struct PP_Var key_system,
+ struct PP_Var session_id,
+ struct PP_Var message,
+ struct PP_Var default_url) {
EnterInstance enter(instance);
- if (enter.succeeded()) {
- enter.functions()->KeyMessage(instance, key_system, session_id, message,
+ if (enter.succeeded())
+ enter.functions()->KeyMessage(instance,
+ key_system,
+ session_id,
+ message,
default_url);
- }
}
void KeyError(PP_Instance instance,
- PP_Var key_system,
- PP_Var session_id,
+ struct PP_Var key_system,
+ struct PP_Var session_id,
int32_t media_error,
int32_t system_code) {
EnterInstance enter(instance);
- if (enter.succeeded()) {
- enter.functions()->KeyError(instance, key_system, session_id, media_error,
+ if (enter.succeeded())
+ enter.functions()->KeyError(instance,
+ key_system,
+ session_id,
+ media_error,
system_code);
- }
}
void DeliverBlock(PP_Instance instance,
PP_Resource decrypted_block,
- const PP_DecryptedBlockInfo* block_info) {
+ const struct PP_DecryptedBlockInfo* decrypted_block_info) {
EnterInstance enter(instance);
if (enter.succeeded())
- enter.functions()->DeliverBlock(instance, decrypted_block, block_info);
+ enter.functions()->DeliverBlock(instance,
+ decrypted_block,
+ decrypted_block_info);
}
void DecoderInitializeDone(PP_Instance instance,
@@ -66,23 +78,21 @@ void DecoderInitializeDone(PP_Instance instance,
uint32_t request_id,
PP_Bool success) {
EnterInstance enter(instance);
- if (enter.succeeded()) {
+ if (enter.succeeded())
enter.functions()->DecoderInitializeDone(instance,
decoder_type,
request_id,
success);
- }
}
void DecoderDeinitializeDone(PP_Instance instance,
PP_DecryptorStreamType decoder_type,
uint32_t request_id) {
EnterInstance enter(instance);
- if (enter.succeeded()) {
+ if (enter.succeeded())
enter.functions()->DecoderDeinitializeDone(instance,
decoder_type,
request_id);
- }
}
void DecoderResetDone(PP_Instance instance,
@@ -95,21 +105,27 @@ void DecoderResetDone(PP_Instance instance,
void DeliverFrame(PP_Instance instance,
PP_Resource decrypted_frame,
- const PP_DecryptedFrameInfo* frame_info) {
+ const struct PP_DecryptedFrameInfo* decrypted_frame_info) {
EnterInstance enter(instance);
if (enter.succeeded())
- enter.functions()->DeliverFrame(instance, decrypted_frame, frame_info);
+ enter.functions()->DeliverFrame(instance,
+ decrypted_frame,
+ decrypted_frame_info);
}
-void DeliverSamples(PP_Instance instance,
- PP_Resource audio_frames,
- const PP_DecryptedBlockInfo* block_info) {
+void DeliverSamples(
+ PP_Instance instance,
+ PP_Resource audio_frames,
+ const struct PP_DecryptedBlockInfo* decrypted_block_info) {
EnterInstance enter(instance);
if (enter.succeeded())
- enter.functions()->DeliverSamples(instance, audio_frames, block_info);
+ enter.functions()->DeliverSamples(instance,
+ audio_frames,
+ decrypted_block_info);
}
-const PPB_ContentDecryptor_Private g_ppb_decryption_thunk = {
+const PPB_ContentDecryptor_Private_0_6
+ g_ppb_contentdecryptor_private_thunk_0_6 = {
&NeedKey,
&KeyAdded,
&KeyMessage,
@@ -124,9 +140,9 @@ const PPB_ContentDecryptor_Private g_ppb_decryption_thunk = {
} // namespace
-const PPB_ContentDecryptor_Private*
+const PPB_ContentDecryptor_Private_0_6*
GetPPB_ContentDecryptor_Private_0_6_Thunk() {
- return &g_ppb_decryption_thunk;
+ return &g_ppb_contentdecryptor_private_thunk_0_6;
}
} // namespace thunk