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

Side by Side Diff: tools/dom/scripts/systemhtml.py

Issue 13744005: Making supressed DOM types abstract (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « tools/dom/scripts/htmlrenamer.py ('k') | tools/dom/templates/dart2js_impl.darttemplate » ('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 system to generate 6 """This module provides shared functionality for the system to generate
7 Dart:html APIs from the IDL database.""" 7 Dart:html APIs from the IDL database."""
8 8
9 import emitter 9 import emitter
10 import monitored 10 import monitored
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 implements.append(secure_base_name) 508 implements.append(secure_base_name)
509 509
510 implements_str = '' 510 implements_str = ''
511 if implements: 511 if implements:
512 implements_str = ' implements ' + ', '.join(set(implements)) 512 implements_str = ' implements ' + ', '.join(set(implements))
513 513
514 annotations = FormatAnnotationsAndComments( 514 annotations = FormatAnnotationsAndComments(
515 GetAnnotationsAndComments(self._library_name, 515 GetAnnotationsAndComments(self._library_name,
516 self._interface.doc_js_name), '') 516 self._interface.doc_js_name), '')
517 517
518 class_modifiers = ''
519 if self._renamer.ShouldSuppressInterface(self._interface):
520 class_modifiers = 'abstract '
521
518 self._implementation_members_emitter = implementation_emitter.Emit( 522 self._implementation_members_emitter = implementation_emitter.Emit(
519 self._backend.ImplementationTemplate(), 523 self._backend.ImplementationTemplate(),
520 LIBRARYNAME='dart.dom.%s' % self._library_name, 524 LIBRARYNAME='dart.dom.%s' % self._library_name,
521 ANNOTATIONS=annotations, 525 ANNOTATIONS=annotations,
526 CLASS_MODIFIERS=class_modifiers,
522 CLASSNAME=self._interface_type_info.implementation_name(), 527 CLASSNAME=self._interface_type_info.implementation_name(),
523 EXTENDS=' extends %s' % base_class if base_class else '', 528 EXTENDS=' extends %s' % base_class if base_class else '',
524 IMPLEMENTS=implements_str, 529 IMPLEMENTS=implements_str,
525 DOMNAME=self._interface.doc_js_name, 530 DOMNAME=self._interface.doc_js_name,
526 NATIVESPEC=self._backend.NativeSpec()) 531 NATIVESPEC=self._backend.NativeSpec())
527 self._backend.StartInterface(self._implementation_members_emitter) 532 self._backend.StartInterface(self._implementation_members_emitter)
528 533
529 self._backend.EmitHelpers(base_class) 534 self._backend.EmitHelpers(base_class)
530 self._event_generator.EmitStreamProviders( 535 self._event_generator.EmitStreamProviders(
531 self._interface, 536 self._interface,
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 for library_name in libraries: 1152 for library_name in libraries:
1148 self._libraries[library_name] = DartLibrary( 1153 self._libraries[library_name] = DartLibrary(
1149 library_name, template_loader, library_type, output_dir) 1154 library_name, template_loader, library_type, output_dir)
1150 1155
1151 def AddFile(self, basename, library_name, path): 1156 def AddFile(self, basename, library_name, path):
1152 self._libraries[library_name].AddFile(path) 1157 self._libraries[library_name].AddFile(path)
1153 1158
1154 def Emit(self, emitter, auxiliary_dir): 1159 def Emit(self, emitter, auxiliary_dir):
1155 for lib in self._libraries.values(): 1160 for lib in self._libraries.values():
1156 lib.Emit(emitter, auxiliary_dir) 1161 lib.Emit(emitter, auxiliary_dir)
OLDNEW
« no previous file with comments | « tools/dom/scripts/htmlrenamer.py ('k') | tools/dom/templates/dart2js_impl.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698