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

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

Issue 11888013: 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: Fixing test. 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:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | tests/html/fileapi_test.dart » ('J')
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 5246c4b2265abf93f758f3321a31a95a6933d791..d847db642bc40acd88efa8399dca294518145442 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -9863,6 +9863,9 @@ 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;
@@ -22780,11 +22783,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;
Stream<Event> get onContentLoaded => contentLoadedEvent.forTarget(this);
@@ -23278,18 +23284,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;
Stream<Event> get onError => errorEvent.forTarget(this);
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | tests/html/fileapi_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698