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

Side by Side Diff: chrome/common/extensions/api/file_system.idl

Issue 10914284: Rename chrome.fileSystem apis to be expandable to directories if we wish. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Typo Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 namespace fileSystem { 5 namespace fileSystem {
6 dictionary AcceptOption { 6 dictionary AcceptOption {
7 // This is the optional text description for this option. If not present, 7 // This is the optional text description for this option. If not present,
8 // a description will be automatically generated; typically containing an 8 // a description will be automatically generated; typically containing an
9 // expanded list of valid extensions (e.g. "text/html" may expand to 9 // expanded list of valid extensions (e.g. "text/html" may expand to
10 // "*.html, *.htm"). 10 // "*.html, *.htm").
11 DOMString? description; 11 DOMString? description;
12 12
13 // Mime-types to accept, e.g. "image/jpeg" or "audio/*". One of mimeTypes or 13 // Mime-types to accept, e.g. "image/jpeg" or "audio/*". One of mimeTypes or
14 // extensions must contain at least one valid element. 14 // extensions must contain at least one valid element.
15 DOMString[]? mimeTypes; 15 DOMString[]? mimeTypes;
16 16
17 // Extensions to accept, e.g. "jpg", "gif", "crx". 17 // Extensions to accept, e.g. "jpg", "gif", "crx".
18 DOMString[]? extensions; 18 DOMString[]? extensions;
19 }; 19 };
20 20
21 dictionary ChooseFileOptions { 21 dictionary ChooseEntryOptions {
22 // Type of the prompt to show. Valid types are 'openFile', 22 // Type of the prompt to show. Valid types are 'openFile',
23 // 'openWritableFile' or 'saveFile'. 23 // 'openWritableFile' or 'saveFile'.
24 // 24 //
25 // Both 'openFile' and 'openWritableFile' will prompt the user to open an 25 // Both 'openFile' and 'openWritableFile' will prompt the user to open an
26 // existing file, with 'openFile' returning a read-only FileEntry on 26 // existing file, with 'openFile' returning a read-only FileEntry on
27 // success. 'saveFile' will prompt the user to choose an existing file or 27 // success. 'saveFile' will prompt the user to choose an existing file or
28 // a new file, and will return a writable FileEntry. 28 // a new file, and will return a writable FileEntry.
29 // Calls to chooseFile with either 'openWritableFile' or 'saveFile' will 29 // Calls to chooseFile with either 'openWritableFile' or 'saveFile' will
30 // fail unless the application has the 'write' permission under 30 // fail unless the application has the 'write' permission under
31 // 'fileSystem'. 31 // 'fileSystem'.
(...skipping 20 matching lines...) Expand all
52 52
53 interface Functions { 53 interface Functions {
54 // Get the display path of a FileEntry object. The display path is based on 54 // Get the display path of a FileEntry object. The display path is based on
55 // the full path of the file on the local file system, but may be made more 55 // the full path of the file on the local file system, but may be made more
56 // readable for display purposes. 56 // readable for display purposes.
57 static void getDisplayPath([instanceOf=FileEntry] object fileEntry, 57 static void getDisplayPath([instanceOf=FileEntry] object fileEntry,
58 GetDisplayPathCallback callback); 58 GetDisplayPathCallback callback);
59 59
60 // Get a writable FileEntry from another FileEntry. This call will fail if 60 // Get a writable FileEntry from another FileEntry. This call will fail if
61 // the application does not have the 'write' permission under 'fileSystem'. 61 // the application does not have the 'write' permission under 'fileSystem'.
62 static void getWritableFileEntry([instanceOf=FileEntry] object fileEntry, 62 static void getWritableEntry([instanceOf=FileEntry] object fileEntry,
63 FileEntryCallback callback); 63 FileEntryCallback callback);
64 64
65 // Gets whether this FileEntry is writable or not. 65 // Gets whether this FileEntry is writable or not.
66 static void isWritableFileEntry([instanceOf=FileEntry] object fileEntry, 66 static void isWritableEntry([instanceOf=FileEntry] object fileEntry,
67 IsWritableCallback callback); 67 IsWritableCallback callback);
68 68
69 // Ask the user to choose a file. 69 // Ask the user to choose a file.
70 static void chooseFile(optional ChooseFileOptions options, 70 static void chooseEntry(optional ChooseEntryOptions options,
71 FileEntryCallback callback); 71 FileEntryCallback callback);
72 }; 72 };
73 }; 73 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698