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

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

Issue 1173403004: Changed to use JSInterop (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Re-gen'd somehow diffs stopped showing up in CL Created 5 years, 5 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
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | tools/dom/scripts/htmlrenamer.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 from generator import AnalyzeOperation, ConstantOutputOrder, \ 10 from generator import AnalyzeOperation, ConstantOutputOrder, \
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 # returned in generated code. 779 # returned in generated code.
780 assert(dart_name != 'HistoryBase' and dart_name != 'LocationBase') 780 assert(dart_name != 'HistoryBase' and dart_name != 'LocationBase')
781 if dart_name == 'Window': 781 if dart_name == 'Window':
782 return _secure_base_types[dart_name] 782 return _secure_base_types[dart_name]
783 return dart_name 783 return dart_name
784 784
785 def SecureBaseName(self, type_name): 785 def SecureBaseName(self, type_name):
786 if type_name in _secure_base_types: 786 if type_name in _secure_base_types:
787 return _secure_base_types[type_name] 787 return _secure_base_types[type_name]
788 788
789 def is_DOM_type(self, type_name):
790 try:
791 self._type_registry.TypeInfo(type_name)
792 return True
793 except RuntimeError:
794 return False
795
789 def _NarrowToImplementationType(self, type_name): 796 def _NarrowToImplementationType(self, type_name):
790 return self._type_registry.TypeInfo(type_name).narrow_dart_type() 797 return self._type_registry.TypeInfo(type_name).narrow_dart_type()
791 798
792 def _NarrowInputType(self, type_name): 799 def _NarrowInputType(self, type_name):
793 return self._NarrowToImplementationType(type_name) 800 return self._NarrowToImplementationType(type_name)
794 801
795 def _DartType(self, type_name): 802 def _DartType(self, type_name):
796 return self._type_registry.DartType(type_name) 803 return self._type_registry.DartType(type_name)
797 804
798 def _TypeInfo(self, type_name): 805 def _TypeInfo(self, type_name):
799 return self._type_registry.TypeInfo(type_name) 806 return self._type_registry.TypeInfo(type_name)
OLDNEW
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698