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

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

Issue 10389097: Move dart:dom to dart:dom_deprecated (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes from review Created 8 years, 7 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 | « lib/dom/scripts/generator.py ('k') | lib/dom/templates/dom/native/dom_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 from systemfrog import * 9 from systemfrog import *
10 from systeminterface import * 10 from systeminterface import *
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 if interface.parents: 1274 if interface.parents:
1275 supertype = interface.parents[0].type.id 1275 supertype = interface.parents[0].type.id
1276 if not IsDartListType(supertype): 1276 if not IsDartListType(supertype):
1277 base = self._ImplClassName(supertype) 1277 base = self._ImplClassName(supertype)
1278 if IsDartCollectionType(supertype): 1278 if IsDartCollectionType(supertype):
1279 # List methods are injected in AddIndexer. 1279 # List methods are injected in AddIndexer.
1280 pass 1280 pass
1281 else: 1281 else:
1282 base = self._ImplClassName(supertype) 1282 base = self._ImplClassName(supertype)
1283 1283
1284 # TODO(jacobr): this is fragile. There isn't a guarantee that dart:dom 1284 # TODO(jacobr): this is fragile. There isn't a guarantee that
1285 # will continue to exactly match the IDL names. 1285 # dart:dom_deprecated will continue to exactly match the IDL
1286 # names.
1286 dom_name = interface.javascript_binding_name 1287 dom_name = interface.javascript_binding_name
1287 self._system._wrap_cases.append( 1288 self._system._wrap_cases.append(
1288 " case '%s': return new %s._wrap(domObject);" % 1289 " case '%s': return new %s._wrap(domObject);" %
1289 (dom_name, self._class_name)) 1290 (dom_name, self._class_name))
1290 1291
1291 extends = ' extends ' + base if base else ' extends _DOMTypeBase' 1292 extends = ' extends ' + base if base else ' extends _DOMTypeBase'
1292 1293
1293 # TODO: Include all implemented interfaces, including other Lists. 1294 # TODO: Include all implemented interfaces, including other Lists.
1294 implements = [interface_name] 1295 implements = [interface_name]
1295 element_type = MaybeTypedArrayElementType(self._interface) 1296 element_type = MaybeTypedArrayElementType(self._interface)
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 self._members_emitter.Emit( 1579 self._members_emitter.Emit(
1579 '\n' 1580 '\n'
1580 ' $TYPE $HTML_NAME($PARAMS) => $FUNCTION_CALL;\n', 1581 ' $TYPE $HTML_NAME($PARAMS) => $FUNCTION_CALL;\n',
1581 TYPE=info.type_name, 1582 TYPE=info.type_name,
1582 HTML_NAME=html_name, 1583 HTML_NAME=html_name,
1583 PARAMS=info.ParametersImplementationDeclaration(), 1584 PARAMS=info.ParametersImplementationDeclaration(),
1584 FUNCTION_CALL=function_call) 1585 FUNCTION_CALL=function_call)
1585 1586
1586 def AddStaticOperation(self, info): 1587 def AddStaticOperation(self, info):
1587 pass 1588 pass
OLDNEW
« no previous file with comments | « lib/dom/scripts/generator.py ('k') | lib/dom/templates/dom/native/dom_impl.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698