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

Side by Side Diff: client/dom/scripts/systemfrog.py

Issue 9623017: Refactor the event-generation code to locate it in systemhtml.py. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 8 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 | Annotate | Revision Log
« no previous file with comments | « client/dom/scripts/dartgenerator.py ('k') | client/dom/scripts/systemhtml.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality for the systems to generate 6 """This module provides shared functionality for the systems to generate
7 frog binding from the IDL database.""" 7 frog binding from the IDL database."""
8 8
9 import os 9 import os
10 from generator import * 10 from generator import *
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 278
279 def AddSecondaryAttribute(self, interface, getter, setter): 279 def AddSecondaryAttribute(self, interface, getter, setter):
280 self._SecondaryContext(interface) 280 self._SecondaryContext(interface)
281 self.AddAttribute(getter, setter) 281 self.AddAttribute(getter, setter)
282 282
283 def AddSecondaryOperation(self, interface, info): 283 def AddSecondaryOperation(self, interface, info):
284 self._SecondaryContext(interface) 284 self._SecondaryContext(interface)
285 self.AddOperation(info) 285 self.AddOperation(info)
286 286
287 def AddEventAttributes(self, event_attrs):
288 pass
289
290 def _SecondaryContext(self, interface): 287 def _SecondaryContext(self, interface):
291 if interface is not self._current_secondary_parent: 288 if interface is not self._current_secondary_parent:
292 self._current_secondary_parent = interface 289 self._current_secondary_parent = interface
293 self._members_emitter.Emit('\n // From $WHERE\n', WHERE=interface.id) 290 self._members_emitter.Emit('\n // From $WHERE\n', WHERE=interface.id)
294 291
295 def AddIndexer(self, element_type): 292 def AddIndexer(self, element_type):
296 """Adds all the methods required to complete implementation of List.""" 293 """Adds all the methods required to complete implementation of List."""
297 # We would like to simply inherit the implementation of everything except 294 # We would like to simply inherit the implementation of everything except
298 # get length(), [], and maybe []=. It is possible to extend from a base 295 # get length(), [], and maybe []=. It is possible to extend from a base
299 # array implementation class only when there is no other implementation 296 # array implementation class only when there is no other implementation
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 if native_body: 361 if native_body:
365 native_body = " '''" + native_body + "'''" 362 native_body = " '''" + native_body + "'''"
366 363
367 self._members_emitter.Emit( 364 self._members_emitter.Emit(
368 '\n' 365 '\n'
369 ' $TYPE $NAME($PARAMS) native$NATIVESTRING;\n', 366 ' $TYPE $NAME($PARAMS) native$NATIVESTRING;\n',
370 TYPE=self._NarrowOutputType(info.type_name), 367 TYPE=self._NarrowOutputType(info.type_name),
371 NAME=info.name, 368 NAME=info.name,
372 PARAMS=params, 369 PARAMS=params,
373 NATIVESTRING=native_body) 370 NATIVESTRING=native_body)
OLDNEW
« no previous file with comments | « client/dom/scripts/dartgenerator.py ('k') | client/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698