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

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

Issue 287673004: [fsp] First part of support for reading files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 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_unit.gypi ('k') | chrome/common/extensions/api/file_system_provider_internal.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/file_system_provider.idl
diff --git a/chrome/common/extensions/api/file_system_provider.idl b/chrome/common/extensions/api/file_system_provider.idl
index cadaccbf5107c1c05faea466b272739cddc54176..8b02cffde9de774d48025589c3777a72b81b00f9 100644
--- a/chrome/common/extensions/api/file_system_provider.idl
+++ b/chrome/common/extensions/api/file_system_provider.idl
@@ -75,12 +75,18 @@ namespace fileSystemProvider {
// Success callback for the <code>onGetMetadataRequested</code> event.
callback MetadataCallback = void(EntryMetadata metadata);
- // Success callback for the <code>onDirectoryRequested</code> event. If more
- // entries will be returned, then <code>hasNext</code> must be true, and it
- // has to be called again with additional entries. If no more entries are
+ // Success callback for the <code>onReadDirectoryRequested</code> event. If
+ // more entries will be returned, then <code>hasNext</code> must be true, and
+ // it has to be called again with additional entries. If no more entries are
// available, then <code>hasNext</code> must be set to false.
callback EntriesCallback = void(ResourceEntry[] entries, bool hasNext);
+ // Success callback for the <code>onReadFileRequested</code> event. If more
+ // data will be returned, then <code>hasNext</code> must be true, and it
+ // has to be called again with additional entries. If no more data is
+ // available, then <code>hasNext</code> must be set to false.
+ callback FileDataCallback = void(DOMString data, bool hasNext);
+
interface Functions {
// Mounts a file system with the given <code>displayName</code>.
// <code>displayName</code> will be shown in the left panel of
@@ -152,6 +158,18 @@ namespace fileSystemProvider {
long openRequestId,
ProviderSuccessCallback successCallback,
ProviderErrorCallback errorCallback);
+
+ // Raised when contents of a file opened previously with <code>openRequestId
+ // </code>. The results should be returned in chunks by calling <code>
+ // successCallback</code> several times. In case of an error, <code>
+ // errorCallback</code> must be called.
+ [maxListeners=1] static void onReadFileRequested(
+ long fileSystemId,
+ long openRequestId,
+ double offset,
+ double length,
+ FileDataCallback successCallback,
+ ProviderErrorCallback errorCallback);
};
};
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/extensions/api/file_system_provider_internal.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698