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

Side by Side Diff: client/dom/scripts/dartgenerator.py

Issue 9167039: WebKit refresh (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 8 years, 11 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 | « client/dom/generated/wrapping_dom_externs.js ('k') | client/dom/wrapping_dom.dart » ('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) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, 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 generates Dart APIs from the IDL database.""" 6 """This module generates Dart APIs from the IDL database."""
7 7
8 import emitter 8 import emitter
9 import idlnode 9 import idlnode
10 import logging 10 import logging
(...skipping 29 matching lines...) Expand all
40 'string': 'String', 40 'string': 'String',
41 'void': 'void', 41 'void': 'void',
42 'Array': 'List', 42 'Array': 'List',
43 'sequence': 'List', 43 'sequence': 'List',
44 # TODO(vsm): We need to support other types. We could weaken to 44 # TODO(vsm): We need to support other types. We could weaken to
45 # Object, or inject SSV into the appropriate types. 45 # Object, or inject SSV into the appropriate types.
46 'SerializedScriptValue': 'String', 46 'SerializedScriptValue': 'String',
47 # TODO(vsm): Automatically recognize types defined in src. 47 # TODO(vsm): Automatically recognize types defined in src.
48 'TimeoutHandler': 'TimeoutHandler', 48 'TimeoutHandler': 'TimeoutHandler',
49 'RequestAnimationFrameCallback': 'RequestAnimationFrameCallback', 49 'RequestAnimationFrameCallback': 'RequestAnimationFrameCallback',
50
51 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool}
52 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa ce
53 'WebKitFlags': 'Object',
50 } 54 }
51 55
52 _dart_to_idl_type_conversions = dict((v,k) for k, v in 56 _dart_to_idl_type_conversions = dict((v,k) for k, v in
53 _idl_to_dart_type_conversions.iteritems()) 57 _idl_to_dart_type_conversions.iteritems())
54 58
55 59
56 # 60 #
57 # Identifiers that are used in the IDL than need to be treated specially because 61 # Identifiers that are used in the IDL than need to be treated specially because
58 # *some* JavaScript processors forbid them as properties. 62 # *some* JavaScript processors forbid them as properties.
59 # 63 #
(...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 Arguments: 2062 Arguments:
2059 info: An OperationInfo object. 2063 info: An OperationInfo object.
2060 """ 2064 """
2061 # TODO(vsm): Handle overloads. 2065 # TODO(vsm): Handle overloads.
2062 self._members_emitter.Emit( 2066 self._members_emitter.Emit(
2063 '\n' 2067 '\n'
2064 ' $TYPE $NAME($ARGS) native;\n', 2068 ' $TYPE $NAME($ARGS) native;\n',
2065 TYPE=info.type_name, 2069 TYPE=info.type_name,
2066 NAME=info.name, 2070 NAME=info.name,
2067 ARGS=info.arg_implementation_declaration) 2071 ARGS=info.arg_implementation_declaration)
OLDNEW
« no previous file with comments | « client/dom/generated/wrapping_dom_externs.js ('k') | client/dom/wrapping_dom.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698