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

Unified Diff: third_party/chrome/idl/file_system.idl

Issue 12261015: Import chrome idl into third_party (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « third_party/chrome/idl/file_browser_private.json ('k') | third_party/chrome/idl/font_settings.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/chrome/idl/file_system.idl
diff --git a/third_party/chrome/idl/file_system.idl b/third_party/chrome/idl/file_system.idl
new file mode 100644
index 0000000000000000000000000000000000000000..d894bd1ad6c5b698a8efb79059a70636e3f80093
--- /dev/null
+++ b/third_party/chrome/idl/file_system.idl
@@ -0,0 +1,80 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+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 ChooseEntryOptions {
+ // Type of the prompt to show. Valid types are 'openFile',
+ // 'openWritableFile' or 'saveFile'.
+ //
+ // Both 'openFile' and 'openWritableFile' will prompt the user to open an
+ // existing file, with 'openFile' returning a read-only FileEntry on
+ // success. 'saveFile' will prompt the user to choose an existing file or
+ // a new file, and will return a writable FileEntry.
+ // Calls to chooseFile with either 'openWritableFile' or 'saveFile' will
+ // fail unless the application has the 'write' permission under
+ // 'fileSystem'.
+ //
+ // The default is 'openFile'.
+ DOMString? type;
+
+ // 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);
+ callback IsWritableCallback = void (boolean isWritable);
+
+ interface Functions {
+ // Get the display path of a FileEntry object. The display path is based on
+ // the full path of the file on the local file system, but may be made more
+ // readable for display purposes.
+ static void getDisplayPath([instanceOf=FileEntry] object fileEntry,
+ GetDisplayPathCallback callback);
+
+ // Get a writable FileEntry from another FileEntry. This call will fail if
+ // the application does not have the 'write' permission under 'fileSystem'.
+ static void getWritableEntry([instanceOf=FileEntry] object fileEntry,
+ FileEntryCallback callback);
+
+ // Gets whether this FileEntry is writable or not.
+ static void isWritableEntry([instanceOf=FileEntry] object fileEntry,
+ IsWritableCallback callback);
+
+ // Ask the user to choose a file.
+ static void chooseEntry(optional ChooseEntryOptions options,
+ FileEntryCallback callback);
+
+ // Returns the file entry with the given id.
+ [nocompile] static FileEntry getEntryById(DOMString id);
+
+ // Returns the id of the given file entry.
+ [nocompile] static DOMString getEntryId(
+ [instanceOf=FileEntry] object fileEntry);
+ };
+};
« no previous file with comments | « third_party/chrome/idl/file_browser_private.json ('k') | third_party/chrome/idl/font_settings.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698