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

Side by Side Diff: sdk/lib/html/scripts/systemhtml.py

Issue 11416294: Changing template file names to key off of the DOM name rather than Dart name. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | « no previous file | sdk/lib/html/scripts/systemnative.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 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 os 10 import os
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 418
419 def NativeSpec(self): 419 def NativeSpec(self):
420 native_spec = MakeNativeSpec(self._interface.javascript_binding_name) 420 native_spec = MakeNativeSpec(self._interface.javascript_binding_name)
421 return ' native "%s"' % native_spec 421 return ' native "%s"' % native_spec
422 422
423 def ImplementationTemplate(self): 423 def ImplementationTemplate(self):
424 if IsPureInterface(self._interface.id): 424 if IsPureInterface(self._interface.id):
425 return self._template_loader.Load('pure_interface.darttemplate') 425 return self._template_loader.Load('pure_interface.darttemplate')
426 426
427 template_file = ('impl_%s.darttemplate' % 427 template_file = ('impl_%s.darttemplate' %
428 self._interface_type_info.interface_name()) 428 self._interface.doc_js_name)
429 return (self._template_loader.TryLoad(template_file) or 429 return (self._template_loader.TryLoad(template_file) or
430 self._template_loader.Load('dart2js_impl.darttemplate')) 430 self._template_loader.Load('dart2js_impl.darttemplate'))
431 431
432 def StartInterface(self, emitter): 432 def StartInterface(self, emitter):
433 self._members_emitter = emitter 433 self._members_emitter = emitter
434 434
435 def FinishInterface(self): 435 def FinishInterface(self):
436 pass 436 pass
437 437
438 def EmitFactoryProvider(self, constructor_info, factory_provider, emitter): 438 def EmitFactoryProvider(self, constructor_info, factory_provider, emitter):
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 for library_name in libraries: 982 for library_name in libraries:
983 self._libraries[library_name] = DartLibrary( 983 self._libraries[library_name] = DartLibrary(
984 library_name, template_loader, library_type, output_dir) 984 library_name, template_loader, library_type, output_dir)
985 985
986 def AddFile(self, basename, library_name, path): 986 def AddFile(self, basename, library_name, path):
987 self._libraries[library_name].AddFile(path) 987 self._libraries[library_name].AddFile(path)
988 988
989 def Emit(self, emitter, auxiliary_dir): 989 def Emit(self, emitter, auxiliary_dir):
990 for lib in self._libraries.values(): 990 for lib in self._libraries.values():
991 lib.Emit(emitter, auxiliary_dir) 991 lib.Emit(emitter, auxiliary_dir)
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698