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

Unified Diff: tools/dom/scripts/htmlrenamer.py

Issue 12380046: Future-ify all the html methods and add named parameters (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/scripts/monitored.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/htmlrenamer.py
diff --git a/tools/dom/scripts/htmlrenamer.py b/tools/dom/scripts/htmlrenamer.py
index 705232a142404329779ca540d1d1c1afeeaf9db0..e6fd9cdc5862992faf51bd650550bc133a4d5161 100644
--- a/tools/dom/scripts/htmlrenamer.py
+++ b/tools/dom/scripts/htmlrenamer.py
@@ -18,13 +18,25 @@ html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames', {
'DOMFormData': 'FormData',
'DOMURL': 'Url',
'DOMWindow': 'Window',
+ 'EntryCallback': '_EntryCallback',
+ 'EntriesCallback': '_EntriesCallback',
+ 'ErrorCallback': '_ErrorCallback',
+ 'FileCallback': '_FileCallback',
+ 'FileSystemCallback': '_FileSystemCallback',
+ 'FileWriterCallback': '_FileWriterCallback',
'HTMLDocument' : 'HtmlDocument',
'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts.
'NamedNodeMap': '_NamedNodeMap',
'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback',
'NavigatorUserMediaSuccessCallback': '_NavigatorUserMediaSuccessCallback',
+ 'NotificationPermissionCallback': '_NotificationPermissionCallback',
'PositionCallback': '_PositionCallback',
'PositionErrorCallback': '_PositionErrorCallback',
+ 'RTCErrorCallback': '_RtcErrorCallback',
+ 'RTCSessionDescriptionCallback': '_RtcSessionDescriptionCallback',
+ 'StorageInfoErrorCallback': '_StorageInfoErrorCallback',
+ 'StorageInfoUsageCallback': '_StorageInfoUsageCallback',
+ 'StringCallback': '_StringCallback',
'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts.
'SVGElement': 'SvgElement', # Manual to avoid name conflicts.
'SVGException': 'SvgException', # Manual of avoid conflict with Exception.
@@ -79,6 +91,33 @@ _removed_html_interfaces = [
for interface in _removed_html_interfaces:
html_interface_renames[interface] = '_' + interface
+convert_to_future_members = monitored.Set(
+ 'htmlrenamer.converted_to_future_members', [
+ 'DataTransferItem.getAsString',
+ 'DirectoryEntry.getDirectory',
+ 'DirectoryEntry.getFile',
+ 'DirectoryEntry.removeRecursively',
+ 'DirectoryReader.readEntries',
+ 'DOMWindow.webkitRequestFileSystem',
+ 'DOMWindow.webkitResolveLocalFileSystemURL',
+ 'Entry.copyTo',
+ 'Entry.getMetadata',
+ 'Entry.getParent',
+ 'Entry.moveTo',
+ 'Entry.remove',
+ 'FileEntry.createWriter',
+ 'FileEntry.file',
+ 'Notification.requestPermission',
+ 'NotificationCenter.requestPermission',
+ 'RTCPeerConnection.createAnswer',
+ 'RTCPeerConnection.createOffer',
+ 'RTCPeerConnection.setLocalDescription',
+ 'RTCPeerConnection.setRemoteDescription',
+ 'StorageInfo.queryUsageAndQuota',
+ 'StorageInfo.requestQuota',
+ 'WorkerContext.webkitResolveLocalFileSystemURL',
+])
+
# Members from the standard dom that should not be exposed publicly in dart:html
# but need to be exposed internally to implement dart:html on top of a standard
# browser.
@@ -235,8 +274,6 @@ renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', {
'DOMWindow.webkitNotifications': 'notifications',
'DOMWindow.webkitRequestFileSystem': 'requestFileSystem',
'DOMWindow.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl',
- 'DOMWindow.webkitRequestFileSystem': 'requestFileSystem',
- 'DOMWindow.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl',
'Element.webkitCreateShadowRoot': 'createShadowRoot',
'Element.webkitMatchesSelector' : 'matches',
'Navigator.webkitGetUserMedia': '_getUserMedia',
@@ -255,6 +292,12 @@ renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', {
'resolveLocalFileSystemUrl',
})
+for member in convert_to_future_members:
+ if member in renamed_html_members:
+ renamed_html_members[member] = '_' + renamed_html_members[member]
+ else:
+ renamed_html_members[member] = '_' + member[member.find('.') + 1 :]
+
# Members and classes from the dom that should be removed completely from
# dart:html. These could be expressed in the IDL instead but expressing this
# as a simple table instead is more concise.
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/scripts/monitored.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698