OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // Use the <code>chrome.fileSystemProvider</code> API to create file systems, | 5 // Use the <code>chrome.fileSystemProvider</code> API to create file systems, |
6 // that can be accessible from the file manager on Chrome OS. | 6 // that can be accessible from the file manager on Chrome OS. |
7 [platforms=("chromeos"), | 7 [platforms=("chromeos"), |
8 implemented_in="chrome/browser/chromeos/extensions/file_system_provider/file_sy
stem_provider_api.h"] | 8 implemented_in="chrome/browser/chromeos/extensions/file_system_provider/file_sy
stem_provider_api.h"] |
9 namespace fileSystemProvider { | 9 namespace fileSystemProvider { |
10 // Error codes used by providing extensions in response to requests. For | 10 // Error codes used by providing extensions in response to requests. For |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // Name of this entry (not full path name). | 42 // Name of this entry (not full path name). |
43 DOMString name; | 43 DOMString name; |
44 | 44 |
45 // File size in bytes. | 45 // File size in bytes. |
46 double size; | 46 double size; |
47 | 47 |
48 // The last modified time of this entry. | 48 // The last modified time of this entry. |
49 [instanceOf=Date] object modificationTime; | 49 [instanceOf=Date] object modificationTime; |
50 | 50 |
51 // Mime type for the entry. | 51 // Mime type for the entry. |
52 DOMString? mimeType; | 52 DOMString? mimeType; |
| 53 |
| 54 // Thumbnail image as a data URI in either PNG, JPEG or WEBP format, at most |
| 55 // 32 KB in size. Optional, but can be provided only when explicitly |
| 56 // requested by the <code>onGetMetadataRequested</code> event. |
| 57 DOMString? thumbnail; |
53 }; | 58 }; |
54 | 59 |
55 // Represents a mounted file system. | 60 // Represents a mounted file system. |
56 dictionary FileSystemInfo { | 61 dictionary FileSystemInfo { |
57 DOMString fileSystemId; | 62 DOMString fileSystemId; |
58 DOMString displayName; | 63 DOMString displayName; |
59 [nodoc] boolean writable; | 64 [nodoc] boolean writable; |
60 }; | 65 }; |
61 | 66 |
62 // Options for the <code>mount()</code> method. | 67 // Options for the <code>mount()</code> method. |
(...skipping 12 matching lines...) Expand all Loading... |
75 dictionary UnmountRequestedOptions { | 80 dictionary UnmountRequestedOptions { |
76 DOMString fileSystemId; | 81 DOMString fileSystemId; |
77 long requestId; | 82 long requestId; |
78 }; | 83 }; |
79 | 84 |
80 // Options for the <code>onGetMetadataRequested()</code> event. | 85 // Options for the <code>onGetMetadataRequested()</code> event. |
81 dictionary GetMetadataRequestedOptions { | 86 dictionary GetMetadataRequestedOptions { |
82 DOMString fileSystemId; | 87 DOMString fileSystemId; |
83 long requestId; | 88 long requestId; |
84 DOMString entryPath; | 89 DOMString entryPath; |
| 90 |
| 91 // Set to <code>true</code> if the thumbnail is requested. |
| 92 boolean thumbnail; |
85 }; | 93 }; |
86 | 94 |
87 // Options for the <code>onReadDirectoryRequested()</code> event. | 95 // Options for the <code>onReadDirectoryRequested()</code> event. |
88 dictionary ReadDirectoryRequestedOptions { | 96 dictionary ReadDirectoryRequestedOptions { |
89 DOMString fileSystemId; | 97 DOMString fileSystemId; |
90 long requestId; | 98 long requestId; |
91 DOMString directoryPath; | 99 DOMString directoryPath; |
92 }; | 100 }; |
93 | 101 |
94 // Options for the <code>onOpenFileRequested()</code> event. | 102 // Options for the <code>onOpenFileRequested()</code> event. |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 // </code> must be called. Note, that callbacks of the aborted operation | 363 // </code> must be called. Note, that callbacks of the aborted operation |
356 // should not be called, as they will be ignored. Despite calling <code> | 364 // should not be called, as they will be ignored. Despite calling <code> |
357 // errorCallback</code>, the request may be forcibly aborted. | 365 // errorCallback</code>, the request may be forcibly aborted. |
358 [maxListeners=1, nodoc] static void onAbortRequested( | 366 [maxListeners=1, nodoc] static void onAbortRequested( |
359 AbortRequestedOptions options, | 367 AbortRequestedOptions options, |
360 ProviderSuccessCallback successCallback, | 368 ProviderSuccessCallback successCallback, |
361 ProviderErrorCallback errorCallback); | 369 ProviderErrorCallback errorCallback); |
362 }; | 370 }; |
363 }; | 371 }; |
364 | 372 |
OLD | NEW |