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

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

Issue 1233083004: Fixed Dictionary and Event hookup w/o --gen-interop (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Merged 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/htmldartgenerator.py ('k') | tools/dom/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 logging 10 import logging
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 ' $CLASSNAME.created() : super.created();\n', 686 ' $CLASSNAME.created() : super.created();\n',
687 CLASSNAME=self._interface_type_info.implementation_name()) 687 CLASSNAME=self._interface_type_info.implementation_name())
688 688
689 self._backend.EmitSupportCheck() 689 self._backend.EmitSupportCheck()
690 690
691 merged_interface = self._interface_type_info.merged_interface() 691 merged_interface = self._interface_type_info.merged_interface()
692 if merged_interface: 692 if merged_interface:
693 self._backend.AddMembers(self._database.GetInterface(merged_interface), 693 self._backend.AddMembers(self._database.GetInterface(merged_interface),
694 not self._backend.ImplementsMergedMembers()) 694 not self._backend.ImplementsMergedMembers())
695 695
696 self._backend.AddMembers(self._interface) 696 self._backend.AddMembers(self._interface, self._options.dart_js_interop)
697 self._backend.AddSecondaryMembers(self._interface) 697 self._backend.AddSecondaryMembers(self._interface)
698 self._event_generator.EmitStreamGetters( 698 self._event_generator.EmitStreamGetters(
699 self._interface, 699 self._interface,
700 [], 700 [],
701 implementation_members_emitter, 701 implementation_members_emitter,
702 self._library_name, stream_getter_signatures_emitter, 702 self._library_name, stream_getter_signatures_emitter,
703 element_stream_getters_emitter) 703 element_stream_getters_emitter)
704 self._backend.FinishInterface() 704 self._backend.FinishInterface()
705 705
706 def _ImplementationEmitter(self): 706 def _ImplementationEmitter(self):
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 1022
1023 def AmendIndexer(self, element_type): 1023 def AmendIndexer(self, element_type):
1024 pass 1024 pass
1025 1025
1026 def RootClassName(self): 1026 def RootClassName(self):
1027 return 'Interceptor' 1027 return 'Interceptor'
1028 1028
1029 def OmitOperationOverrides(self): 1029 def OmitOperationOverrides(self):
1030 return True 1030 return True
1031 1031
1032 def EmitOperation(self, info, html_name): 1032 def EmitOperation(self, info, html_name, dart_js_interop=False):
1033 """ 1033 """
1034 Arguments: 1034 Arguments:
1035 info: An OperationInfo object. 1035 info: An OperationInfo object.
1036 """ 1036 """
1037 if self._HasCustomImplementation(info.name): 1037 if self._HasCustomImplementation(info.name):
1038 return 1038 return
1039 1039
1040 if IsPureInterface(self._interface.id): 1040 if IsPureInterface(self._interface.id):
1041 self._AddInterfaceOperation(info, html_name) 1041 self._AddInterfaceOperation(info, html_name)
1042 elif info.callback_args: 1042 elif info.callback_args:
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 1365
1366 def AddFile(self, basename, library_name, path): 1366 def AddFile(self, basename, library_name, path):
1367 self._libraries[library_name].AddFile(path) 1367 self._libraries[library_name].AddFile(path)
1368 1368
1369 def AddTypeEntry(self, library_name, idl_name, dart_name): 1369 def AddTypeEntry(self, library_name, idl_name, dart_name):
1370 self._libraries[library_name].AddTypeEntry(idl_name, dart_name) 1370 self._libraries[library_name].AddTypeEntry(idl_name, dart_name)
1371 1371
1372 def Emit(self, emitter, auxiliary_dir): 1372 def Emit(self, emitter, auxiliary_dir):
1373 for lib in self._libraries.values(): 1373 for lib in self._libraries.values():
1374 lib.Emit(emitter, auxiliary_dir) 1374 lib.Emit(emitter, auxiliary_dir)
OLDNEW
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698