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

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

Issue 1416043008: Hide implementation members in dart:html, dart:js and related libraries (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 611
612 @Deprecated("Internal Use Only") 612 @Deprecated("Internal Use Only")
613 static {0} internalCreate{0}() {{ 613 static {0} internalCreate{0}() {{
614 return new {0}._internalWrap(); 614 return new {0}._internalWrap();
615 }} 615 }}
616 616
617 factory {0}._internalWrap() {{ 617 factory {0}._internalWrap() {{
618 return new {0}.internal_(); 618 return new {0}.internal_();
619 }} 619 }}
620 620
621 @Deprecated("Internal Use Only")
621 {0}.internal_() : super.internal_(); 622 {0}.internal_() : super.internal_();
622 623
623 '''.format(class_name) 624 '''.format(class_name)
624 if base_class == 'NativeFieldWrapperClass2' or base_class == 'DartHtmlDomObj ect': 625 if base_class == 'NativeFieldWrapperClass2' or base_class == 'DartHtmlDomObj ect':
625 js_interop_wrapper = ''' 626 js_interop_wrapper = '''
626 @Deprecated("Internal Use Only") 627 @Deprecated("Internal Use Only")
627 static {0} internalCreate{0}() {{ 628 static {0} internalCreate{0}() {{
628 return new {0}._internalWrap(); 629 return new {0}._internalWrap();
629 }} 630 }}
630 631
631 factory {0}._internalWrap() {{ 632 factory {0}._internalWrap() {{
632 return new {0}.internal_(); 633 return new {0}.internal_();
633 }} 634 }}
634 635
636 @Deprecated("Internal Use Only")
635 {0}.internal_() {{ }} 637 {0}.internal_() {{ }}
636 638
637 {1}'''.format(class_name, js_interop_equivalence_op) 639 {1}'''.format(class_name, js_interop_equivalence_op)
638 # Change to use the synthesized class so we can construct with a mixin 640 # Change to use the synthesized class so we can construct with a mixin
639 # classes prefixed with name of NativeFieldWrapperClass2 don't have a 641 # classes prefixed with name of NativeFieldWrapperClass2 don't have a
640 # default constructor so classes with mixins can't be new'd. 642 # default constructor so classes with mixins can't be new'd.
641 if (self._options.templates._conditions['DARTIUM'] and 643 if (self._options.templates._conditions['DARTIUM'] and
642 self._options.dart_js_interop and 644 self._options.dart_js_interop and
643 (self._interface.id == 'NamedNodeMap' or 645 (self._interface.id == 'NamedNodeMap' or
644 self._interface.id == 'CSSStyleDeclaration')): 646 self._interface.id == 'CSSStyleDeclaration')):
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 1338
1337 def AddFile(self, basename, library_name, path): 1339 def AddFile(self, basename, library_name, path):
1338 self._libraries[library_name].AddFile(path) 1340 self._libraries[library_name].AddFile(path)
1339 1341
1340 def AddTypeEntry(self, library_name, idl_name, dart_name): 1342 def AddTypeEntry(self, library_name, idl_name, dart_name):
1341 self._libraries[library_name].AddTypeEntry(idl_name, dart_name) 1343 self._libraries[library_name].AddTypeEntry(idl_name, dart_name)
1342 1344
1343 def Emit(self, emitter, auxiliary_dir): 1345 def Emit(self, emitter, auxiliary_dir):
1344 for lib in self._libraries.values(): 1346 for lib in self._libraries.values():
1345 lib.Emit(emitter, auxiliary_dir) 1347 lib.Emit(emitter, auxiliary_dir)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698