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

Unified Diff: tools/json_schema_compiler/compiler.py

Issue 12181005: generated_api.h should have its body generated into generated_api.cc (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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
Index: tools/json_schema_compiler/compiler.py
diff --git a/tools/json_schema_compiler/compiler.py b/tools/json_schema_compiler/compiler.py
index a270756bf31bd127fa8d4a7203d44fad1b1dc94a..bf54b3eb4e9685aed1ac3f3d2f0b6dd1d3eebc4e 100755
--- a/tools/json_schema_compiler/compiler.py
+++ b/tools/json_schema_compiler/compiler.py
@@ -155,6 +155,7 @@ def handle_bundle_schema(filenames, dest_dir, root, root_namespace):
generator = schema_bundle_generator.SchemaBundleGenerator(
root, api_model, api_defs, type_generator)
api_h_code = generator.GenerateAPIHeader().Render()
+ api_cc_code = generator.GenerateAPICC().Render()
schemas_h_code = generator.GenerateSchemasHeader().Render()
schemas_cc_code = generator.GenerateSchemasCC().Render()
@@ -162,6 +163,8 @@ def handle_bundle_schema(filenames, dest_dir, root, root_namespace):
basedir = os.path.join(dest_dir, 'chrome/common/extensions/api')
with open(os.path.join(basedir, 'generated_api.h'), 'w') as h_file:
h_file.write(api_h_code)
+ with open(os.path.join(basedir, 'generated_api.cc'), 'w') as cc_file:
+ cc_file.write(api_cc_code)
with open(os.path.join(basedir, 'generated_schemas.h'), 'w') as h_file:
h_file.write(schemas_h_code)
with open(os.path.join(basedir, 'generated_schemas.cc'), 'w') as cc_file:
@@ -171,6 +174,10 @@ def handle_bundle_schema(filenames, dest_dir, root, root_namespace):
print
print api_h_code
print
+ print 'generated_api.cc'
+ print
+ print api_cc_code
+ print
print 'generated_schemas.h'
print
print schemas_h_code

Powered by Google App Engine
This is Rietveld 408576698