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

Unified Diff: ppapi/generators/idl_thunk.py

Issue 137353003: Pepper: Reduce includes in generated thunks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ppapi/thunk/ppb_console_thunk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/generators/idl_thunk.py
diff --git a/ppapi/generators/idl_thunk.py b/ppapi/generators/idl_thunk.py
index 023335c9a2d0b4ba80ba108e5b0121e2a4c305fa..d06defbfd2c193619875a0f98f86da0acecebd66 100755
--- a/ppapi/generators/idl_thunk.py
+++ b/ppapi/generators/idl_thunk.py
@@ -460,9 +460,7 @@ class TGen(GeneratorByFile):
includes = ['ppapi/c/pp_errors.h',
'ppapi/shared_impl/tracked_callback.h',
'ppapi/thunk/enter.h',
- 'ppapi/thunk/ppb_instance_api.h',
- 'ppapi/thunk/resource_creation_api.h',
- 'ppapi/thunk/thunk.h']
+ 'ppapi/thunk/ppapi_thunk_export.h']
includes.append(_GetHeaderFileName(filenode))
for api in meta.Apis():
includes.append('%s' % api.lower())
@@ -547,10 +545,11 @@ class TGen(GeneratorByFile):
out.Write('} // namespace\n')
out.Write('\n')
for thunk_type, thunk_name in version_list:
- thunk_decl = 'const %s* Get%s_Thunk() {\n' % (thunk_type, thunk_type)
+ thunk_decl = ('PPAPI_THUNK_EXPORT const %s* Get%s_Thunk() {\n' %
+ (thunk_type, thunk_type))
if len(thunk_decl) > 80:
- thunk_decl = 'const %s*\n Get%s_Thunk() {\n' % (thunk_type,
- thunk_type)
+ thunk_decl = ('PPAPI_THUNK_EXPORT const %s*\n Get%s_Thunk() {\n' %
+ (thunk_type, thunk_type))
out.Write(thunk_decl)
out.Write(' return &%s;\n' % thunk_name)
out.Write('}\n')
« no previous file with comments | « no previous file | ppapi/thunk/ppb_console_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698