| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 part of $LIBRARYNAME; |
| 6 |
| 7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 8 $if DART2JS |
| 9 /** |
| 10 * Gets an instance of the Indexed DB factory to being using Indexed DB. |
| 11 * |
| 12 * Use [IdbFactory.supported] to check if Indexed DB is supported on the |
| 13 * current platform. |
| 14 */ |
| 15 @SupportedBrowser(SupportedBrowser.CHROME, '23.0') |
| 16 @SupportedBrowser(SupportedBrowser.FIREFOX, '15.0') |
| 17 @SupportedBrowser(SupportedBrowser.IE, '10.0') |
| 18 @Experimental |
| 19 IdbFactory get indexedDB => |
| 20 JS('IdbFactory', |
| 21 '#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB', |
| 22 this, this, this); |
| 23 $endif |
| 24 |
| 25 /** |
| 26 * Access a sandboxed file system of the specified `size`. If `persistent` is |
| 27 * true, the application will request permission from the user to create |
| 28 * lasting storage. This storage cannot be freed without the user's |
| 29 * permission. Returns a [Future] whose value stores a reference to the |
| 30 * sandboxed file system for use. Because the file system is sandboxed, |
| 31 * applications cannot access file systems created in other web pages. |
| 32 */ |
| 33 @DomName('WorkerContext.webkitRequestFileSystem') |
| 34 @DocsEditable |
| 35 @SupportedBrowser(SupportedBrowser.CHROME) |
| 36 @Experimental |
| 37 Future<FileSystem> requestFileSystem(int size, {bool persistent: false}) { |
| 38 return _requestFileSystem(persistent? 1 : 0, size); |
| 39 } |
| 40 |
| 41 /** |
| 42 * Access a sandboxed file system of the specified `size`. If `persistent` is |
| 43 * true, the application will request permission from the user to create |
| 44 * lasting storage. This storage cannot be freed without the user's |
| 45 * permission. This call will block until a reference to the synchronous file |
| 46 * system API has been obtained. Because the file system is sandboxed, |
| 47 * applications cannot access file systems created in other web pages. |
| 48 */ |
| 49 @DomName('WorkerContext.webkitRequestFileSystemSync') |
| 50 @DocsEditable |
| 51 @SupportedBrowser(SupportedBrowser.CHROME) |
| 52 @Experimental |
| 53 FileSystemSync requestFileSystemSync(int size, {bool persistent: false}) { |
| 54 return _requestFileSystemSync(persistent? 1 : 0, size); |
| 55 } |
| 56 $!MEMBERS |
| 57 } |
| OLD | NEW |