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

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

Issue 10704008: Make HtmlFrogSystem and NativeImplementationSystem the backends for HtmlInterfacesSystem and remove… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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
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 29 matching lines...) Expand all
40 40
41 dart_code = self._ImplFileEmitter(interface.id) 41 dart_code = self._ImplFileEmitter(interface.id)
42 generator = FrogInterfaceGenerator(self, interface, template, dart_code) 42 generator = FrogInterfaceGenerator(self, interface, template, dart_code)
43 generator.Generate() 43 generator.Generate()
44 44
45 def GenerateLibraries(self): 45 def GenerateLibraries(self):
46 self._GenerateLibFile( 46 self._GenerateLibFile(
47 'frog_dom.darttemplate', 47 'frog_dom.darttemplate',
48 os.path.join(self._output_dir, 'dom_frog.dart'), 48 os.path.join(self._output_dir, 'dom_frog.dart'),
49 (self._interface_system._dart_interface_file_paths + 49 (self._interface_system._dart_interface_file_paths +
50 self._interface_system._dart_callback_file_paths +
51 self._impl_file_paths)) 50 self._impl_file_paths))
52 51
53 def Finish(self): 52 def Finish(self):
54 pass 53 pass
55 54
56 def _ImplFileEmitter(self, name): 55 def _ImplFileEmitter(self, name):
57 """Returns the file emitter of the Frog implementation file.""" 56 """Returns the file emitter of the Frog implementation file."""
58 path = os.path.join(self._output_dir, 'src', 'frog', '%s.dart' % name) 57 path = os.path.join(self._output_dir, 'src', 'frog', '%s.dart' % name)
59 self._impl_file_paths.append(path) 58 self._impl_file_paths.append(path)
60 return self._emitters.FileEmitter(path) 59 return self._emitters.FileEmitter(path)
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 if native_body: 387 if native_body:
389 native_string = " '''" + native_body + "'''" 388 native_string = " '''" + native_body + "'''"
390 389
391 self._members_emitter.Emit( 390 self._members_emitter.Emit(
392 '\n' 391 '\n'
393 ' $TYPE $NAME($PARAMS) native$NATIVESTRING;\n', 392 ' $TYPE $NAME($PARAMS) native$NATIVESTRING;\n',
394 TYPE=self._NarrowOutputType(info.type_name), 393 TYPE=self._NarrowOutputType(info.type_name),
395 NAME=info.name, 394 NAME=info.name,
396 PARAMS=params, 395 PARAMS=params,
397 NATIVESTRING=native_string) 396 NATIVESTRING=native_string)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698