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

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

Issue 284443002: [fsp] Add support for opening 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 f8ed6ba789618ee6dd9b184d4b63e1d6fa21c6ea..8942bda4efd015c4411082737103064bc49095a1 100644
--- a/chrome/common/extensions/api/file_system_provider.idl
+++ b/chrome/common/extensions/api/file_system_provider.idl
@@ -29,6 +29,12 @@ namespace fileSystemProvider {
IO
};
+ // Mode of opening a file. Used by <code>onOpenFileRequested</code>.
+ enum OpenFileMode {
+ READ,
+ WRITE
+ };
+
// Represents metadata of a file or a directory.
dictionary EntryMetadata {
// True if it is a directory.
@@ -116,7 +122,7 @@ namespace fileSystemProvider {
long fileSystemId,
DOMString entryPath,
MetadataCallback successCallback,
- ErrorCallback errorCallback);
+ ProviderErrorCallback errorCallback);
// Raised when contents of a directory at <code>directoryPath</code> are
// requested. The results should be returned in chunks by calling the <code>
@@ -126,7 +132,18 @@ namespace fileSystemProvider {
long fileSystemId,
DOMString directoryPath,
EntriesCallback successCallback,
- ErrorCallback errorCallback);
+ ProviderErrorCallback errorCallback);
+
+ // Raised when opening a file at <code>filePath</code> is requested.
+ // If <code>create</code> is set to <code>true</code> and the file does not
+ // exist, then it should be created.
+ [maxListeners=1] static void onOpenFileRequested(
+ long fileSystemId,
+ DOMString filePath,
+ OpenFileMode mode,
+ boolean create,
+ ProviderSuccessCallback 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