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

Side by Side Diff: third_party/chrome/tools/json_schema_compiler/compiler.py

Issue 12300042: Update idlsync.py to pull in dependencies required for chrome api generation. (Closed) Base URL: git://github.com/dart-lang/bleeding_edge.git@master
Patch Set: From another checkout Created 7 years, 9 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 """Generator for C++ structs from api json files. 5 """Generator for C++ structs from api json files.
6 6
7 The purpose of this tool is to remove the need for hand-written code that 7 The purpose of this tool is to remove the need for hand-written code that
8 converts to and from base::Value types when receiving javascript api calls. 8 converts to and from base::Value types when receiving javascript api calls.
9 Originally written for generating code for extension apis. Reference schemas 9 Originally written for generating code for extension apis. Reference schemas
10 are in chrome/common/extensions/api. 10 are in chrome/common/extensions/api.
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 if not args: 199 if not args:
200 sys.exit(0) # This is OK as a no-op 200 sys.exit(0) # This is OK as a no-op
201 dest_dir = opts.destdir 201 dest_dir = opts.destdir
202 root_namespace = opts.namespace 202 root_namespace = opts.namespace
203 203
204 if opts.bundle: 204 if opts.bundle:
205 handle_bundle_schema(args, dest_dir, opts.root, root_namespace) 205 handle_bundle_schema(args, dest_dir, opts.root, root_namespace)
206 else: 206 else:
207 handle_single_schema(args[0], dest_dir, opts.root, root_namespace) 207 handle_single_schema(args[0], dest_dir, opts.root, root_namespace)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698