| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Generated from namespace: fileSystem | 5 // Generated from namespace: fileSystem |
| 6 | 6 |
| 7 part of chrome; | 7 part of chrome; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Types | 10 * Types |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 /* | 31 /* |
| 32 * Public accessors | 32 * Public accessors |
| 33 */ | 33 */ |
| 34 /// This is the optional text description for this option. If not present, a | 34 /// This is the optional text description for this option. If not present, a |
| 35 /// description will be automatically generated; typically containing an | 35 /// description will be automatically generated; typically containing an |
| 36 /// expanded list of valid extensions (e.g. "text/html" may expand to "*.html, | 36 /// expanded list of valid extensions (e.g. "text/html" may expand to "*.html, |
| 37 /// *.htm"). | 37 /// *.htm"). |
| 38 String get description => JS('String', '#.description', this._jsObject); | 38 String get description => JS('String', '#.description', this._jsObject); |
| 39 | 39 |
| 40 set description(String description) { | 40 void set description(String description) { |
| 41 JS('void', '#.description = #', this._jsObject, description); | 41 JS('void', '#.description = #', this._jsObject, description); |
| 42 } | 42 } |
| 43 | 43 |
| 44 /// Mime-types to accept, e.g. "image/jpeg" or "audio/*". One of mimeTypes or | 44 /// Mime-types to accept, e.g. "image/jpeg" or "audio/*". One of mimeTypes or |
| 45 /// extensions must contain at least one valid element. | 45 /// extensions must contain at least one valid element. |
| 46 List<String> get mimeTypes => JS('List<String>', '#.mimeTypes', this._jsObject
); | 46 List<String> get mimeTypes => JS('List<String>', '#.mimeTypes', this._jsObject
); |
| 47 | 47 |
| 48 set mimeTypes(List<String> mimeTypes) { | 48 void set mimeTypes(List<String> mimeTypes) { |
| 49 JS('void', '#.mimeTypes = #', this._jsObject, mimeTypes); | 49 JS('void', '#.mimeTypes = #', this._jsObject, mimeTypes); |
| 50 } | 50 } |
| 51 | 51 |
| 52 /// Extensions to accept, e.g. "jpg", "gif", "crx". | 52 /// Extensions to accept, e.g. "jpg", "gif", "crx". |
| 53 List<String> get extensions => JS('List<String>', '#.extensions', this._jsObje
ct); | 53 List<String> get extensions => JS('List<String>', '#.extensions', this._jsObje
ct); |
| 54 | 54 |
| 55 set extensions(List<String> extensions) { | 55 void set extensions(List<String> extensions) { |
| 56 JS('void', '#.extensions = #', this._jsObject, extensions); | 56 JS('void', '#.extensions = #', this._jsObject, extensions); |
| 57 } | 57 } |
| 58 | 58 |
| 59 } | 59 } |
| 60 | 60 |
| 61 class FilesystemChooseEntryOptions extends ChromeObject { | 61 class FilesystemChooseEntryOptions extends ChromeObject { |
| 62 /* | 62 /* |
| 63 * Public constructor | 63 * Public constructor |
| 64 */ | 64 */ |
| 65 FilesystemChooseEntryOptions({String type, String suggestedName, List<Filesyst
emAcceptOption> accepts, bool acceptsAllTypes}) { | 65 FilesystemChooseEntryOptions({String type, String suggestedName, List<Filesyst
emAcceptOption> accepts, bool acceptsAllTypes}) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 77 * Private constructor | 77 * Private constructor |
| 78 */ | 78 */ |
| 79 FilesystemChooseEntryOptions._proxy(_jsObject) : super._proxy(_jsObject); | 79 FilesystemChooseEntryOptions._proxy(_jsObject) : super._proxy(_jsObject); |
| 80 | 80 |
| 81 /* | 81 /* |
| 82 * Public accessors | 82 * Public accessors |
| 83 */ | 83 */ |
| 84 /// Type of the prompt to show. The default is 'openFile'. | 84 /// Type of the prompt to show. The default is 'openFile'. |
| 85 String get type => JS('String', '#.type', this._jsObject); | 85 String get type => JS('String', '#.type', this._jsObject); |
| 86 | 86 |
| 87 set type(String type) { | 87 void set type(String type) { |
| 88 JS('void', '#.type = #', this._jsObject, type); | 88 JS('void', '#.type = #', this._jsObject, type); |
| 89 } | 89 } |
| 90 | 90 |
| 91 /// The suggested file name that will be presented to the user as the default | 91 /// The suggested file name that will be presented to the user as the default |
| 92 /// name to read or write. This is optional. | 92 /// name to read or write. This is optional. |
| 93 String get suggestedName => JS('String', '#.suggestedName', this._jsObject); | 93 String get suggestedName => JS('String', '#.suggestedName', this._jsObject); |
| 94 | 94 |
| 95 set suggestedName(String suggestedName) { | 95 void set suggestedName(String suggestedName) { |
| 96 JS('void', '#.suggestedName = #', this._jsObject, suggestedName); | 96 JS('void', '#.suggestedName = #', this._jsObject, suggestedName); |
| 97 } | 97 } |
| 98 | 98 |
| 99 /// The optional list of accept options for this file opener. Each option will | 99 /// The optional list of accept options for this file opener. Each option will |
| 100 /// be presented as a unique group to the end-user. | 100 /// be presented as a unique group to the end-user. |
| 101 List<FilesystemAcceptOption> get accepts { | 101 List<FilesystemAcceptOption> get accepts { |
| 102 List<FilesystemAcceptOption> __proxy_accepts = new List<FilesystemAcceptOpti
on>(); | 102 List<FilesystemAcceptOption> __proxy_accepts = new List<FilesystemAcceptOpti
on>(); |
| 103 int count = JS('int', '#.accepts.length', this._jsObject); | 103 int count = JS('int', '#.accepts.length', this._jsObject); |
| 104 for (int i = 0; i < count; i++) { | 104 for (int i = 0; i < count; i++) { |
| 105 var item = JS('', '#.accepts[#]', this._jsObject, i); | 105 var item = JS('', '#.accepts[#]', this._jsObject, i); |
| 106 __proxy_accepts.add(new FilesystemAcceptOption._proxy(item)); | 106 __proxy_accepts.add(new FilesystemAcceptOption._proxy(item)); |
| 107 } | 107 } |
| 108 return __proxy_accepts; | 108 return __proxy_accepts; |
| 109 } | 109 } |
| 110 | 110 |
| 111 set accepts(List<FilesystemAcceptOption> accepts) { | 111 void set accepts(List<FilesystemAcceptOption> accepts) { |
| 112 JS('void', '#.accepts = #', this._jsObject, convertArgument(accepts)); | 112 JS('void', '#.accepts = #', this._jsObject, convertArgument(accepts)); |
| 113 } | 113 } |
| 114 | 114 |
| 115 /// Whether to accept all file types, in addition to the options specified in | 115 /// Whether to accept all file types, in addition to the options specified in |
| 116 /// the accepts argument. The default is true. If the accepts field is unset o
r | 116 /// the accepts argument. The default is true. If the accepts field is unset o
r |
| 117 /// contains no valid entries, this will always be reset to true. | 117 /// contains no valid entries, this will always be reset to true. |
| 118 bool get acceptsAllTypes => JS('bool', '#.acceptsAllTypes', this._jsObject); | 118 bool get acceptsAllTypes => JS('bool', '#.acceptsAllTypes', this._jsObject); |
| 119 | 119 |
| 120 set acceptsAllTypes(bool acceptsAllTypes) { | 120 void set acceptsAllTypes(bool acceptsAllTypes) { |
| 121 JS('void', '#.acceptsAllTypes = #', this._jsObject, acceptsAllTypes); | 121 JS('void', '#.acceptsAllTypes = #', this._jsObject, acceptsAllTypes); |
| 122 } | 122 } |
| 123 | 123 |
| 124 } | 124 } |
| 125 | 125 |
| 126 /** | 126 /** |
| 127 * Functions | 127 * Functions |
| 128 */ | 128 */ |
| 129 | 129 |
| 130 class API_file_system { | 130 class API_file_system { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 /// given file entry. Only the 500 most recently used entries are retained, | 184 /// given file entry. Only the 500 most recently used entries are retained, |
| 185 /// where calls to retainEntry and restoreEntry count as use. If the app has | 185 /// where calls to retainEntry and restoreEntry count as use. If the app has |
| 186 /// the 'retainEntries' permission under 'fileSystem', entries are retained | 186 /// the 'retainEntries' permission under 'fileSystem', entries are retained |
| 187 /// indefinitely. Otherwise, entries are retained only while the app is runnin
g | 187 /// indefinitely. Otherwise, entries are retained only while the app is runnin
g |
| 188 /// and across restarts. | 188 /// and across restarts. |
| 189 String retainEntry(FileEntry fileEntry) => JS('String', '#.retainEntry(#)', th
is._jsObject, convertArgument(fileEntry)); | 189 String retainEntry(FileEntry fileEntry) => JS('String', '#.retainEntry(#)', th
is._jsObject, convertArgument(fileEntry)); |
| 190 | 190 |
| 191 API_file_system(this._jsObject) { | 191 API_file_system(this._jsObject) { |
| 192 } | 192 } |
| 193 } | 193 } |
| OLD | NEW |