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

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

Issue 12039026: Reverting 17420 "Speech recognition APIs" which broke dartium. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « tests/html/speechrecognition_test.dart ('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 re 10 import re
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 ] 685 ]
686 686
687 _history_annotations = _all_but_ie9_annotations 687 _history_annotations = _all_but_ie9_annotations
688 688
689 _performance_annotations = [ 689 _performance_annotations = [
690 "@SupportedBrowser(SupportedBrowser.CHROME)", 690 "@SupportedBrowser(SupportedBrowser.CHROME)",
691 "@SupportedBrowser(SupportedBrowser.FIREFOX)", 691 "@SupportedBrowser(SupportedBrowser.FIREFOX)",
692 "@SupportedBrowser(SupportedBrowser.IE)", 692 "@SupportedBrowser(SupportedBrowser.IE)",
693 ] 693 ]
694 694
695 _speech_recognition_annotations = [
696 "@SupportedBrowser(SupportedBrowser.CHROME, '25')",
697 "@Experimental()",
698 ]
699
700 # Annotations to be placed on generated members. 695 # Annotations to be placed on generated members.
701 # The table is indexed as: 696 # The table is indexed as:
702 # INTERFACE: annotations to be added to the interface declaration 697 # INTERFACE: annotations to be added to the interface declaration
703 # INTERFACE.MEMBER: annotation to be added to the member declaration 698 # INTERFACE.MEMBER: annotation to be added to the member declaration
704 dart_annotations = { 699 dart_annotations = {
705 'ArrayBuffer': _all_but_ie9_annotations, 700 'ArrayBuffer': _all_but_ie9_annotations,
706 'ArrayBufferView': _all_but_ie9_annotations, 701 'ArrayBufferView': _all_but_ie9_annotations,
707 'DOMApplicationCache': [ 702 'DOMApplicationCache': [
708 "@SupportedBrowser(SupportedBrowser.CHROME)", 703 "@SupportedBrowser(SupportedBrowser.CHROME)",
709 "@SupportedBrowser(SupportedBrowser.FIREFOX)", 704 "@SupportedBrowser(SupportedBrowser.FIREFOX)",
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 "@SupportedBrowser(SupportedBrowser.FIREFOX)", 763 "@SupportedBrowser(SupportedBrowser.FIREFOX)",
769 "@SupportedBrowser(SupportedBrowser.SAFARI)", 764 "@SupportedBrowser(SupportedBrowser.SAFARI)",
770 "@Experimental()", 765 "@Experimental()",
771 ], 766 ],
772 'NotificationCenter': _webkit_experimental_annotations, 767 'NotificationCenter': _webkit_experimental_annotations,
773 'Performance': _performance_annotations, 768 'Performance': _performance_annotations,
774 'ShadowRoot': [ 769 'ShadowRoot': [
775 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", 770 "@SupportedBrowser(SupportedBrowser.CHROME, '25')",
776 "@Experimental()", 771 "@Experimental()",
777 ], 772 ],
778 'SpeechRecognition': _speech_recognition_annotations,
779 'SpeechRecognitionAlternative': _speech_recognition_annotations,
780 'SpeechRecognitionError': _speech_recognition_annotations,
781 'SpeechRecognitionEvent': _speech_recognition_annotations,
782 'SpeechRecognitionResult': _speech_recognition_annotations,
783 'WebSocket': _all_but_ie9_annotations, 773 'WebSocket': _all_but_ie9_annotations,
784 'WorkerContext.indexedDB': _indexed_db_annotations, 774 'WorkerContext.indexedDB': _indexed_db_annotations,
785 'WorkerContext.webkitRequestFileSystem': _file_system_annotations, 775 'WorkerContext.webkitRequestFileSystem': _file_system_annotations,
786 'WorkerContext.webkitRequestFileSystemSync': _file_system_annotations, 776 'WorkerContext.webkitRequestFileSystemSync': _file_system_annotations,
787 'WorkerContext.webkitResolveLocalFileSystemSyncURL': _file_system_annotations, 777 'WorkerContext.webkitResolveLocalFileSystemSyncURL': _file_system_annotations,
788 'WorkerContext.webkitResolveLocalFileSystemURL': _file_system_annotations, 778 'WorkerContext.webkitResolveLocalFileSystemURL': _file_system_annotations,
789 } 779 }
790 780
791 def FindCommonAnnotations(interface_name, member_name=None): 781 def FindCommonAnnotations(interface_name, member_name=None):
792 """ Finds annotations common between dart2js and dartium. 782 """ Finds annotations common between dart2js and dartium.
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 self) 1368 self)
1379 1369
1380 if type_data.clazz == 'SVGTearOff': 1370 if type_data.clazz == 'SVGTearOff':
1381 dart_interface_name = self._renamer.RenameInterface( 1371 dart_interface_name = self._renamer.RenameInterface(
1382 self._database.GetInterface(type_name)) 1372 self._database.GetInterface(type_name))
1383 return SVGTearOffIDLTypeInfo( 1373 return SVGTearOffIDLTypeInfo(
1384 type_name, type_data, dart_interface_name, self) 1374 type_name, type_data, dart_interface_name, self)
1385 1375
1386 class_name = '%sIDLTypeInfo' % type_data.clazz 1376 class_name = '%sIDLTypeInfo' % type_data.clazz
1387 return globals()[class_name](type_name, type_data) 1377 return globals()[class_name](type_name, type_data)
OLDNEW
« no previous file with comments | « tests/html/speechrecognition_test.dart ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698