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

Unified Diff: chrome/common/extensions/api/file_system.idl

Issue 10692105: Updates file type selector for fileSystem API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Patch #23 broken Created 8 years, 4 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 | « chrome/chrome_tests.gypi ('k') | chrome/common/extensions/docs/apps/fileSystem.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/file_system.idl
diff --git a/chrome/common/extensions/api/file_system.idl b/chrome/common/extensions/api/file_system.idl
index 51a93a6c39f3cea39c6afa53db43e625276a93b2..44d36655159c4e2822b78d924fbbd9632282654d 100644
--- a/chrome/common/extensions/api/file_system.idl
+++ b/chrome/common/extensions/api/file_system.idl
@@ -5,6 +5,21 @@
// File-level comment to appease parser. Eventually this will not be necessary.
namespace fileSystem {
+ dictionary AcceptOption {
+ // This is the optional text description for this option. If not present,
+ // a description will be automatically generated; typically containing an
+ // expanded list of valid extensions (e.g. "text/html" may expand to
+ // "*.html, *.htm").
+ DOMString? description;
+
+ // Mime-types to accept, e.g. "image/jpeg" or "audio/*". One of mimeTypes or
+ // extensions must contain at least one valid element.
+ DOMString[]? mimeTypes;
+
+ // Extensions to accept, e.g. "jpg", "gif", "crx".
+ DOMString[]? extensions;
+ };
+
dictionary ChooseFileOptions {
// Type of the prompt to show. Valid types are 'openFile',
// 'openWritableFile' or 'saveFile'.
@@ -22,6 +37,15 @@ namespace fileSystem {
// The suggested file name that will be presented to the user as the
// default name to read or write. This is optional.
DOMString? suggestedName;
+
+ // The optional list of accept options for this file opener. Each option
+ // will be presented as a unique group to the end-user.
+ AcceptOption[]? accepts;
+
+ // Whether to accept all file types, in addition to the options specified
+ // in the accepts argument. The default is true. If the accepts field is
+ // unset or contains no valid entries, this will always be reset to true.
+ boolean? acceptsAllTypes;
};
callback GetDisplayPathCallback = void (DOMString displayPath);
callback FileEntryCallback = void ([instanceOf=FileEntry] object fileEntry);
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/extensions/docs/apps/fileSystem.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698