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

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: Cleaned up + added custom bindings. 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
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..afc152e99a6edda76fa6896146b46a6d92104d45 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,16 @@ 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,
+ ProviderSuccessCallback successCallback,
+ ProviderErrorCallback errorCallback);
kinaba 2014/05/13 01:30:35 Where's the <code>create</code> and open mode para
mtomasz 2014/05/13 01:55:01 Done.
};
};

Powered by Google App Engine
This is Rietveld 408576698