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

Side by Side Diff: tools/dom/scripts/systemnative.py

Issue 26729002: dartium_js_interop changes Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased and replied to comments. PTAL Created 7 years, 2 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 | « sdk/lib/js/dartium/js_dartium.dart ('k') | tools/dom/src/native_DOMImplementation.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) 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 native binding from the IDL database.""" 7 native binding from the IDL database."""
8 8
9 import emitter 9 import emitter
10 import os 10 import os
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 e.Emit('#ifndef DartWebkitClassIds_h\n'); 1197 e.Emit('#ifndef DartWebkitClassIds_h\n');
1198 e.Emit('#define DartWebkitClassIds_h\n'); 1198 e.Emit('#define DartWebkitClassIds_h\n');
1199 e.Emit('\n'); 1199 e.Emit('\n');
1200 e.Emit('namespace WebCore {\n'); 1200 e.Emit('namespace WebCore {\n');
1201 e.Emit('\n'); 1201 e.Emit('\n');
1202 e.Emit('enum {\n'); 1202 e.Emit('enum {\n');
1203 e.Emit(' _HistoryCrossFrameClassId = 0,\n'); 1203 e.Emit(' _HistoryCrossFrameClassId = 0,\n');
1204 e.Emit(' _LocationCrossFrameClassId,\n'); 1204 e.Emit(' _LocationCrossFrameClassId,\n');
1205 e.Emit(' _DOMWindowCrossFrameClassId,\n'); 1205 e.Emit(' _DOMWindowCrossFrameClassId,\n');
1206 e.Emit(' _DateTimeClassId,\n'); 1206 e.Emit(' _DateTimeClassId,\n');
1207 e.Emit(' _JsFunctionClassId,\n');
1208 e.Emit(' _JsObjectClassId,\n');
1207 e.Emit(' // New types that are not auto-generated should be added here.\n '); 1209 e.Emit(' // New types that are not auto-generated should be added here.\n ');
1208 e.Emit('\n'); 1210 e.Emit('\n');
1209 for interface in database.GetInterfaces(): 1211 for interface in database.GetInterfaces():
1210 interface_name = interface.id 1212 interface_name = interface.id
1211 e.Emit(' %sClassId,\n' % interface_name) 1213 e.Emit(' %sClassId,\n' % interface_name)
1212 e.Emit(' NumWebkitClassIds\n'); 1214 e.Emit(' NumWebkitClassIds\n');
1213 e.Emit('};\n'); 1215 e.Emit('};\n');
1214 1216
1215 e.Emit('typedef struct {\n'); 1217 e.Emit('typedef struct {\n');
1216 e.Emit(' const char* class_name;\n'); 1218 e.Emit(' const char* class_name;\n');
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 e.Emit('\n'); 1275 e.Emit('\n');
1274 e.Emit('} // namespace WebCore\n'); 1276 e.Emit('} // namespace WebCore\n');
1275 self._emitters.Flush() 1277 self._emitters.Flush()
1276 1278
1277 def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument): 1279 def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument):
1278 return ( 1280 return (
1279 interface.id.endswith('Event') and 1281 interface.id.endswith('Event') and
1280 operation.id.startswith('init') and 1282 operation.id.startswith('init') and
1281 argument.ext_attrs.get('Default') == 'Undefined' and 1283 argument.ext_attrs.get('Default') == 'Undefined' and
1282 argument.type.id == 'DOMString') 1284 argument.type.id == 'DOMString')
OLDNEW
« no previous file with comments | « sdk/lib/js/dartium/js_dartium.dart ('k') | tools/dom/src/native_DOMImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698