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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11856014: Adding support checks for FileSystem APIs and making APIs not webkit-specific. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 2a525136f049e5697bf5105e4fd405cce3036139..9bdcadbd476e740c062460d9d5770f90b6b98d70 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -9345,6 +9345,11 @@ class FileReaderSync native "*FileReaderSync" {
/// @domName DOMFileSystem; @docsEditable true
class FileSystem native "*DOMFileSystem" {
+ /**
+ * Checks if this type is supported on the current platform
+ */
+ static bool get supported => JS('bool', '!!(window.webkitRequestFileSystem)');
+
/// @domName DOMFileSystem.name; @docsEditable true
final String name;
@@ -21717,11 +21722,14 @@ class Window extends EventTarget implements WindowBase native "@*DOMWindow" {
Point webkitConvertPointFromPageToNode(Node node, Point p) native;
/// @domName DOMWindow.webkitRequestFileSystem; @docsEditable true
- void webkitRequestFileSystem(int type, int size, FileSystemCallback successCallback, [ErrorCallback errorCallback]) native;
+ @JSName('webkitRequestFileSystem')
+ @SupportedBrowser(SupportedBrowser.CHROME) @Experimental()
+ void requestFileSystem(int type, int size, FileSystemCallback successCallback, [ErrorCallback errorCallback]) native;
/// @domName DOMWindow.webkitResolveLocalFileSystemURL; @docsEditable true
@JSName('webkitResolveLocalFileSystemURL')
- void webkitResolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native;
+ @SupportedBrowser(SupportedBrowser.CHROME) @Experimental()
+ void resolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native;
}
@@ -22061,18 +22069,24 @@ class WorkerContext extends EventTarget native "*WorkerContext" {
int setTimeout(TimeoutHandler handler, int timeout) native;
/// @domName WorkerContext.webkitRequestFileSystem; @docsEditable true
- void webkitRequestFileSystem(int type, int size, [FileSystemCallback successCallback, ErrorCallback errorCallback]) native;
+ @JSName('webkitRequestFileSystem')
+ @SupportedBrowser(SupportedBrowser.CHROME) @Experimental()
+ void requestFileSystem(int type, int size, [FileSystemCallback successCallback, ErrorCallback errorCallback]) native;
/// @domName WorkerContext.webkitRequestFileSystemSync; @docsEditable true
- FileSystemSync webkitRequestFileSystemSync(int type, int size) native;
+ @JSName('webkitRequestFileSystemSync')
+ @SupportedBrowser(SupportedBrowser.CHROME) @Experimental()
+ FileSystemSync requestFileSystemSync(int type, int size) native;
/// @domName WorkerContext.webkitResolveLocalFileSystemSyncURL; @docsEditable true
@JSName('webkitResolveLocalFileSystemSyncURL')
- EntrySync webkitResolveLocalFileSystemSyncUrl(String url) native;
+ @SupportedBrowser(SupportedBrowser.CHROME) @Experimental()
+ EntrySync resolveLocalFileSystemSyncUrl(String url) native;
/// @domName WorkerContext.webkitResolveLocalFileSystemURL; @docsEditable true
@JSName('webkitResolveLocalFileSystemURL')
- void webkitResolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native;
+ @SupportedBrowser(SupportedBrowser.CHROME) @Experimental()
+ void resolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native;
/**
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698