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

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

Issue 9453030: Fix for issue 1814 for dart:dom (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix typo Created 8 years, 10 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/scripts/generator.py ('k') | no next file » | 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 systems to generate 6 """This module provides shared functionality for the systems to generate
7 frog binding from the IDL database.""" 7 frog binding from the IDL database."""
8 8
9 import os 9 import os
10 from generator import * 10 from generator import *
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 CTOR=self._interface.id, 308 CTOR=self._interface.id,
309 TYPE=element_type) 309 TYPE=element_type)
310 310
311 311
312 def AddOperation(self, info): 312 def AddOperation(self, info):
313 """ 313 """
314 Arguments: 314 Arguments:
315 info: An OperationInfo object. 315 info: An OperationInfo object.
316 """ 316 """
317 # TODO(vsm): Handle overloads. 317 # TODO(vsm): Handle overloads.
318 params = info.ParametersImplementationDeclaration(
319 lambda type_name: self._NarrowInputType(type_name))
320
321 native_body = dom_frog_native_bodies.get(
322 self._interface.id + '.' + info.name, '')
323 if native_body:
324 native_body = " '''" + native_body + "'''"
325
318 self._members_emitter.Emit( 326 self._members_emitter.Emit(
319 '\n' 327 '\n'
320 ' $TYPE $NAME($PARAMS) native;\n', 328 ' $TYPE $NAME($PARAMS) native$NATIVESTRING;\n',
321 TYPE=self._NarrowOutputType(info.type_name), 329 TYPE=self._NarrowOutputType(info.type_name),
322 NAME=info.name, 330 NAME=info.name,
323 PARAMS=info.ParametersImplementationDeclaration( 331 PARAMS=params,
324 lambda type_name: self._NarrowInputType(type_name))) 332 NATIVESTRING=native_body)
OLDNEW
« no previous file with comments | « client/dom/scripts/generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698