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

Unified Diff: tools/json_schema_compiler/js_interface_generator.py

Issue 1605083002: Elim 'new ChromeEvent' from interface generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_563744_line_wrap
Patch Set: Rebase Created 4 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 | tools/json_schema_compiler/js_interface_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/js_interface_generator.py
diff --git a/tools/json_schema_compiler/js_interface_generator.py b/tools/json_schema_compiler/js_interface_generator.py
index e971ff5035211ad8316f62c50db32df2baa98816..e6c892a8674a586ae7892396fb0a830967d86cef 100644
--- a/tools/json_schema_compiler/js_interface_generator.py
+++ b/tools/json_schema_compiler/js_interface_generator.py
@@ -46,13 +46,15 @@ class _Generator(object):
for function in self._namespace.functions.values():
self._AppendFunction(c, function)
+ c.TrimTrailingNewlines()
+ c.Eblock('};')
+ c.Append()
+
for event in self._namespace.events.values():
self._AppendEvent(c, event)
c.TrimTrailingNewlines()
- c.Eblock('};')
-
return c
def _GetHeader(self, tool, namespace):
@@ -93,5 +95,7 @@ class _Generator(object):
c.Append(self._js_util.GetSeeLink(self._namespace.name, 'event',
event.name))
c.Eblock(' */')
- c.Append('%s: new ChromeEvent(),' % (event.name))
+
+ c.Append('%s.prototype.%s;' % (self._interface, event.name))
+
c.Append()
« no previous file with comments | « no previous file | tools/json_schema_compiler/js_interface_generator_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698