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

Unified Diff: tools/json_schema_compiler/model.py

Issue 2649373002: Re-land: Update json_schema_compiler to handle the Automation extension API (Closed)
Patch Set: Fix presubmit Created 3 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 | « tools/json_schema_compiler/js_util.py ('k') | ui/accessibility/PRESUBMIT.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/model.py
diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py
index e0147b5b4889fb2a86b59a74648a4deb24316051..6dc87a964ecf9644b3e6c588dc40732d2130ce67 100644
--- a/tools/json_schema_compiler/model.py
+++ b/tools/json_schema_compiler/model.py
@@ -183,6 +183,7 @@ class Type(object):
self.simple_name = _StripNamespace(self.name, namespace)
self.unix_name = UnixName(self.name)
self.description = json.get('description', None)
+ self.jsexterns = json.get('jsexterns', None)
self.origin = origin
self.parent = parent
self.instance_of = json.get('isInstanceOf', None)
@@ -317,8 +318,9 @@ class Function(object):
self.filters = [GeneratePropertyFromParam(filter_instance)
for filter_instance in json.get('filters', [])]
callback_param = None
- for param in json.get('parameters', []):
- if param.get('type') == 'function':
+ params = json.get('parameters', [])
+ for i, param in enumerate(params):
+ if param.get('type') == 'function' and i == len(params) - 1:
if callback_param:
# No ParseException because the webstore has this.
# Instead, pretend all intermediate callbacks are properties.
« no previous file with comments | « tools/json_schema_compiler/js_util.py ('k') | ui/accessibility/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698