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

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

Issue 8873008: Added constructor for AudioContext for dartc and frog (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 'Touch' 64 'Touch'
65 ]) 65 ])
66 66
67 # 67 #
68 # Types with user-invocable constructors. We do not have enough 68 # Types with user-invocable constructors. We do not have enough
69 # information in IDL to create the signature. 69 # information in IDL to create the signature.
70 # 70 #
71 # Each entry is of the form: 71 # Each entry is of the form:
72 # type name: constructor parameters 72 # type name: constructor parameters
73 _constructable_types = { 73 _constructable_types = {
74 'AudioContext': '',
74 'FileReader': '', 75 'FileReader': '',
75 'XMLHttpRequest': '', 76 'XMLHttpRequest': '',
76 'WebKitCSSMatrix': '[String spec]', 77 'WebKitCSSMatrix': '[String spec]',
77 'WebKitPoint': 'num x, num y', 78 'WebKitPoint': 'num x, num y',
78 # dart:html types 79 # dart:html types
79 'CSSMatrix': '[String spec]', 80 'CSSMatrix': '[String spec]',
80 'Point': 'num x, num y', 81 'Point': 'num x, num y',
81 } 82 }
82 83
83 # 84 #
(...skipping 2401 matching lines...) Expand 10 before | Expand all | Expand 10 after
2485 Arguments: 2486 Arguments:
2486 info: An OperationInfo object. 2487 info: An OperationInfo object.
2487 """ 2488 """
2488 # TODO(vsm): Handle overloads. 2489 # TODO(vsm): Handle overloads.
2489 self._members_emitter.Emit( 2490 self._members_emitter.Emit(
2490 '\n' 2491 '\n'
2491 ' $TYPE $NAME($ARGS) native;\n', 2492 ' $TYPE $NAME($ARGS) native;\n',
2492 TYPE=info.type_name, 2493 TYPE=info.type_name,
2493 NAME=info.name, 2494 NAME=info.name,
2494 ARGS=info.arg_implementation_declaration) 2495 ARGS=info.arg_implementation_declaration)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698