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

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

Issue 13444007: Removing all Worker-related APIs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 systems to generate 6 """This module provides shared functionality for systems to generate
7 Dart APIs from the IDL database.""" 7 Dart APIs from the IDL database."""
8 8
9 import copy 9 import copy
10 import json 10 import json
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 Conversion('convertDartToNative_Dictionary', 'Map', 'dynamic'), 486 Conversion('convertDartToNative_Dictionary', 'Map', 'dynamic'),
487 487
488 'sequence<DOMString> set': 488 'sequence<DOMString> set':
489 Conversion('convertDartToNative_StringArray', 'List<String>', 'List'), 489 Conversion('convertDartToNative_StringArray', 'List<String>', 'List'),
490 490
491 'any set IDBObjectStore.add': _serialize_SSV, 491 'any set IDBObjectStore.add': _serialize_SSV,
492 'any set IDBObjectStore.put': _serialize_SSV, 492 'any set IDBObjectStore.put': _serialize_SSV,
493 'any set IDBCursor.update': _serialize_SSV, 493 'any set IDBCursor.update': _serialize_SSV,
494 494
495 # postMessage 495 # postMessage
496 'any set DedicatedWorkerContext.postMessage': _serialize_SSV, 496 # 'any set DedicatedWorkerContext.postMessage': _serialize_SSV, # Workers
vsm 2013/04/05 15:54:53 The commented code here and below is pretty ugly.
Emily Fortuna 2013/04/05 16:21:08 Yeah, I'd be inclined to delete as well. That's wh
blois 2013/04/05 16:43:09 Removed.
497 'any set MessagePort.postMessage': _serialize_SSV, 497 'any set MessagePort.postMessage': _serialize_SSV,
498 'SerializedScriptValue set DOMWindow.postMessage': _serialize_SSV, 498 'SerializedScriptValue set DOMWindow.postMessage': _serialize_SSV,
499 'SerializedScriptValue set Worker.postMessage': _serialize_SSV, 499 # 'SerializedScriptValue set Worker.postMessage': _serialize_SSV, # Workers
500 500
501 # receiving message via MessageEvent 501 # receiving message via MessageEvent
502 '* get MessageEvent.data': 502 '* get MessageEvent.data':
503 Conversion('convertNativeToDart_SerializedScriptValue', 503 Conversion('convertNativeToDart_SerializedScriptValue',
504 'dynamic', 'dynamic'), 504 'dynamic', 'dynamic'),
505 505
506 '* get History.state': 506 '* get History.state':
507 Conversion('_convertNativeToDart_SerializedScriptValue', 507 Conversion('_convertNativeToDart_SerializedScriptValue',
508 'dynamic', 'dynamic'), 508 'dynamic', 'dynamic'),
509 509
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 587
588 # Methods returning Window can return a local window, or a cross-frame 588 # Methods returning Window can return a local window, or a cross-frame
589 # window (=Object) that needs wrapping. 589 # window (=Object) that needs wrapping.
590 'DOMWindow': [ 590 'DOMWindow': [
591 "@Creates('Window|=Object')", 591 "@Creates('Window|=Object')",
592 "@Returns('Window|=Object')", 592 "@Returns('Window|=Object')",
593 ], 593 ],
594 594
595 'DOMWindow.openDatabase': [ 595 'DOMWindow.openDatabase': [
596 "@Creates('SqlDatabase')", 596 "@Creates('SqlDatabase')",
597 "@Creates('SqlDatabaseSync')", 597 "@Creates('_SqlDatabaseSync')",
598 ], 598 ],
599 599
600 # To be in callback with the browser-created Event, we had to have called 600 # To be in callback with the browser-created Event, we had to have called
601 # addEventListener on the target, so we avoid 601 # addEventListener on the target, so we avoid
602 'Event.currentTarget': [ 602 'Event.currentTarget': [
603 "@Creates('Null')", 603 "@Creates('Null')",
604 "@Returns('EventTarget|=Object')", 604 "@Returns('EventTarget|=Object')",
605 ], 605 ],
606 606
607 # Only nodes in the DOM bubble and have target !== currentTarget. 607 # Only nodes in the DOM bubble and have target !== currentTarget.
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 'SVGFETurbulenceElement': _svg_annotations, 891 'SVGFETurbulenceElement': _svg_annotations,
892 'SVGFilterElement': _svg_annotations, 892 'SVGFilterElement': _svg_annotations,
893 'SVGForeignObjectElement': _no_ie_annotations, 893 'SVGForeignObjectElement': _no_ie_annotations,
894 'SVGSetElement': _no_ie_annotations, 894 'SVGSetElement': _no_ie_annotations,
895 'SQLTransaction': _web_sql_annotations, 895 'SQLTransaction': _web_sql_annotations,
896 'SQLTransactionSync': _web_sql_annotations, 896 'SQLTransactionSync': _web_sql_annotations,
897 'WebGLRenderingContext': _webgl_annotations, 897 'WebGLRenderingContext': _webgl_annotations,
898 'WebKitCSSMatrix': _webkit_experimental_annotations, 898 'WebKitCSSMatrix': _webkit_experimental_annotations,
899 'WebKitPoint': _webkit_experimental_annotations, 899 'WebKitPoint': _webkit_experimental_annotations,
900 'WebSocket': _all_but_ie9_annotations, 900 'WebSocket': _all_but_ie9_annotations,
901 'WorkerContext.indexedDB': _indexed_db_annotations, 901 # 'WorkerContext.indexedDB': _indexed_db_annotations, # Workers
902 'WorkerContext.openDatabase': _web_sql_annotations, 902 # 'WorkerContext.openDatabase': _web_sql_annotations, # Workers
903 'WorkerContext.openDatabaseSync': _web_sql_annotations, 903 # 'WorkerContext.openDatabaseSync': _web_sql_annotations, # Workers
904 'WorkerContext.webkitRequestFileSystem': _file_system_annotations, 904 # 'WorkerContext.webkitRequestFileSystem': _file_system_annotations, # Workers
905 'WorkerContext.webkitRequestFileSystemSync': _file_system_annotations, 905 # 'WorkerContext.webkitRequestFileSystemSync': _file_system_annotations, # Wor kers
906 'WorkerContext.webkitResolveLocalFileSystemSyncURL': _file_system_annotations, 906 # 'WorkerContext.webkitResolveLocalFileSystemSyncURL': _file_system_annotation s, # Workers
907 'WorkerContext.webkitResolveLocalFileSystemURL': _file_system_annotations, 907 # 'WorkerContext.webkitResolveLocalFileSystemURL': _file_system_annotations, # Workers
908 'XMLHttpRequest.onloadend': _all_but_ie9_annotations, 908 'XMLHttpRequest.onloadend': _all_but_ie9_annotations,
909 'XMLHttpRequest.onprogress': _all_but_ie9_annotations, 909 'XMLHttpRequest.onprogress': _all_but_ie9_annotations,
910 'XMLHttpRequest.response': _all_but_ie9_annotations, 910 'XMLHttpRequest.response': _all_but_ie9_annotations,
911 'XMLHttpRequestProgressEvent': _webkit_experimental_annotations, 911 'XMLHttpRequestProgressEvent': _webkit_experimental_annotations,
912 'XSLTProcessor': [ 912 'XSLTProcessor': [
913 "@SupportedBrowser(SupportedBrowser.CHROME)", 913 "@SupportedBrowser(SupportedBrowser.CHROME)",
914 "@SupportedBrowser(SupportedBrowser.FIREFOX)", 914 "@SupportedBrowser(SupportedBrowser.FIREFOX)",
915 "@SupportedBrowser(SupportedBrowser.SAFARI)", 915 "@SupportedBrowser(SupportedBrowser.SAFARI)",
916 ], 916 ],
917 }) 917 })
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 self) 1566 self)
1567 1567
1568 if type_data.clazz == 'SVGTearOff': 1568 if type_data.clazz == 'SVGTearOff':
1569 dart_interface_name = self._renamer.RenameInterface( 1569 dart_interface_name = self._renamer.RenameInterface(
1570 self._database.GetInterface(type_name)) 1570 self._database.GetInterface(type_name))
1571 return SVGTearOffIDLTypeInfo( 1571 return SVGTearOffIDLTypeInfo(
1572 type_name, type_data, dart_interface_name, self) 1572 type_name, type_data, dart_interface_name, self)
1573 1573
1574 class_name = '%sIDLTypeInfo' % type_data.clazz 1574 class_name = '%sIDLTypeInfo' % type_data.clazz
1575 return globals()[class_name](type_name, type_data) 1575 return globals()[class_name](type_name, type_data)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698