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

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

Issue 12077039: Adding supported checks for WebGL (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « tools/dom/idl/dart/dart.idl ('k') | tools/dom/scripts/systemhtml.py » ('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 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", 698 "@SupportedBrowser(SupportedBrowser.CHROME, '25')",
699 "@Experimental", 699 "@Experimental",
700 ] 700 ]
701 701
702 _web_sql_annotations = [ 702 _web_sql_annotations = [
703 "@SupportedBrowser(SupportedBrowser.CHROME)", 703 "@SupportedBrowser(SupportedBrowser.CHROME)",
704 "@SupportedBrowser(SupportedBrowser.SAFARI)", 704 "@SupportedBrowser(SupportedBrowser.SAFARI)",
705 "@Experimental", 705 "@Experimental",
706 ] 706 ]
707 707
708 _webgl_annotations = [
709 "@SupportedBrowser(SupportedBrowser.CHROME)",
710 "@SupportedBrowser(SupportedBrowser.FIREFOX)",
711 "@Experimental",
712 ]
713
708 # Annotations to be placed on generated members. 714 # Annotations to be placed on generated members.
709 # The table is indexed as: 715 # The table is indexed as:
710 # INTERFACE: annotations to be added to the interface declaration 716 # INTERFACE: annotations to be added to the interface declaration
711 # INTERFACE.MEMBER: annotation to be added to the member declaration 717 # INTERFACE.MEMBER: annotation to be added to the member declaration
712 dart_annotations = { 718 dart_annotations = {
713 'ArrayBuffer': _all_but_ie9_annotations, 719 'ArrayBuffer': _all_but_ie9_annotations,
714 'ArrayBufferView': _all_but_ie9_annotations, 720 'ArrayBufferView': _all_but_ie9_annotations,
715 'Database': _web_sql_annotations, 721 'Database': _web_sql_annotations,
716 'DatabaseSync': _web_sql_annotations, 722 'DatabaseSync': _web_sql_annotations,
717 'DOMApplicationCache': [ 723 'DOMApplicationCache': [
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", 800 "@SupportedBrowser(SupportedBrowser.CHROME, '25')",
795 "@Experimental", 801 "@Experimental",
796 ], 802 ],
797 'SpeechRecognition': _speech_recognition_annotations, 803 'SpeechRecognition': _speech_recognition_annotations,
798 'SpeechRecognitionAlternative': _speech_recognition_annotations, 804 'SpeechRecognitionAlternative': _speech_recognition_annotations,
799 'SpeechRecognitionError': _speech_recognition_annotations, 805 'SpeechRecognitionError': _speech_recognition_annotations,
800 'SpeechRecognitionEvent': _speech_recognition_annotations, 806 'SpeechRecognitionEvent': _speech_recognition_annotations,
801 'SpeechRecognitionResult': _speech_recognition_annotations, 807 'SpeechRecognitionResult': _speech_recognition_annotations,
802 'SQLTransaction': _web_sql_annotations, 808 'SQLTransaction': _web_sql_annotations,
803 'SQLTransactionSync': _web_sql_annotations, 809 'SQLTransactionSync': _web_sql_annotations,
810 'WebGLRenderingContext': _webgl_annotations,
804 'WebKitCSSMatrix': _webkit_experimental_annotations, 811 'WebKitCSSMatrix': _webkit_experimental_annotations,
805 'WebKitPoint': _webkit_experimental_annotations, 812 'WebKitPoint': _webkit_experimental_annotations,
806 'WebSocket': _all_but_ie9_annotations, 813 'WebSocket': _all_but_ie9_annotations,
807 'WorkerContext.indexedDB': _indexed_db_annotations, 814 'WorkerContext.indexedDB': _indexed_db_annotations,
808 'WorkerContext.openDatabase': _web_sql_annotations, 815 'WorkerContext.openDatabase': _web_sql_annotations,
809 'WorkerContext.openDatabaseSync': _web_sql_annotations, 816 'WorkerContext.openDatabaseSync': _web_sql_annotations,
810 'WorkerContext.webkitRequestFileSystem': _file_system_annotations, 817 'WorkerContext.webkitRequestFileSystem': _file_system_annotations,
811 'WorkerContext.webkitRequestFileSystemSync': _file_system_annotations, 818 'WorkerContext.webkitRequestFileSystemSync': _file_system_annotations,
812 'WorkerContext.webkitResolveLocalFileSystemSyncURL': _file_system_annotations, 819 'WorkerContext.webkitResolveLocalFileSystemSyncURL': _file_system_annotations,
813 'WorkerContext.webkitResolveLocalFileSystemURL': _file_system_annotations, 820 'WorkerContext.webkitResolveLocalFileSystemURL': _file_system_annotations,
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 self) 1451 self)
1445 1452
1446 if type_data.clazz == 'SVGTearOff': 1453 if type_data.clazz == 'SVGTearOff':
1447 dart_interface_name = self._renamer.RenameInterface( 1454 dart_interface_name = self._renamer.RenameInterface(
1448 self._database.GetInterface(type_name)) 1455 self._database.GetInterface(type_name))
1449 return SVGTearOffIDLTypeInfo( 1456 return SVGTearOffIDLTypeInfo(
1450 type_name, type_data, dart_interface_name, self) 1457 type_name, type_data, dart_interface_name, self)
1451 1458
1452 class_name = '%sIDLTypeInfo' % type_data.clazz 1459 class_name = '%sIDLTypeInfo' % type_data.clazz
1453 return globals()[class_name](type_name, type_data) 1460 return globals()[class_name](type_name, type_data)
OLDNEW
« no previous file with comments | « tools/dom/idl/dart/dart.idl ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698