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

Unified Diff: tools/json_schema_compiler/cpp_bundle_generator.py

Issue 183763032: Add an implementation path option to json_schema_compiler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add default impl_dir Created 6 years, 10 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 | « tools/json_schema_compiler/compiler.py ('k') | tools/json_schema_compiler/dart_generator_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/cpp_bundle_generator.py
diff --git a/tools/json_schema_compiler/cpp_bundle_generator.py b/tools/json_schema_compiler/cpp_bundle_generator.py
index 1cadff8348da5e05f3d41b024ea87bfbe6572d12..09163cda6027b8b30eeda05c248c5f6d2892112a 100644
--- a/tools/json_schema_compiler/cpp_bundle_generator.py
+++ b/tools/json_schema_compiler/cpp_bundle_generator.py
@@ -40,13 +40,15 @@ class CppBundleGenerator(object):
api_defs,
cpp_type_generator,
cpp_namespace,
- source_file_dir):
+ source_file_dir,
+ impl_dir):
self._root = root
self._model = model
self._api_defs = api_defs
self._cpp_type_generator = cpp_type_generator
self._cpp_namespace = cpp_namespace
self._source_file_dir = source_file_dir
+ self._impl_dir = impl_dir
self.api_cc_generator = _APICCGenerator(self)
self.api_h_generator = _APIHGenerator(self)
@@ -183,8 +185,9 @@ class _APICCGenerator(object):
namespace_name = namespace.unix_name.replace("experimental_", "")
implementation_header = namespace.compiler_options.get(
"implemented_in",
- "chrome/browser/extensions/api/%s/%s_api.h" % (namespace_name,
- namespace_name))
+ "%s/%s/%s_api.h" % (self._bundle._impl_dir,
+ namespace_name,
+ namespace_name))
if not os.path.exists(
os.path.join(self._bundle._root,
os.path.normpath(implementation_header))):
« no previous file with comments | « tools/json_schema_compiler/compiler.py ('k') | tools/json_schema_compiler/dart_generator_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698