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

Unified Diff: chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h

Issue 1151763007: Add the boilerplate for actions to File System Provider API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 5 years, 6 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/browser/chromeos/file_system_provider/provided_file_system_interface.h
diff --git a/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h b/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h
index ccb6ecf505fa640a825e7218f3466a05afbec2fb..df3f37419e5941614db63c5df65a242e7a6e594a 100644
--- a/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h
+++ b/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h
@@ -51,6 +51,14 @@ struct EntryMetadata {
DISALLOW_COPY_AND_ASSIGN(EntryMetadata);
};
+// Represents actions for either a file or a directory.
+struct Action {
+ std::string id;
+ std::string title;
+};
+
+typedef std::vector<Action> Actions;
+
// Mode of opening a file. Used by OpenFile().
enum OpenFileMode { OPEN_FILE_MODE_READ, OPEN_FILE_MODE_WRITE };
@@ -91,6 +99,9 @@ class ProvidedFileSystemInterface {
typedef base::Callback<void(scoped_ptr<EntryMetadata> entry_metadata,
base::File::Error result)> GetMetadataCallback;
+ typedef base::Callback<void(const Actions& actions, base::File::Error result)>
+ GetActionsCallback;
+
// Mask of fields requested from the GetMetadata() call.
typedef int MetadataFieldMask;
@@ -108,6 +119,11 @@ class ProvidedFileSystemInterface {
MetadataFieldMask fields,
const GetMetadataCallback& callback) = 0;
+ // Requests list of actions for the passed |entry_path|. It can be either a
+ // file or a directory.
+ virtual AbortCallback GetActions(const base::FilePath& entry_path,
+ const GetActionsCallback& callback) = 0;
+
// Requests enumerating entries from the passed |directory_path|. The callback
// can be called multiple times until |has_more| is set to false.
virtual AbortCallback ReadDirectory(

Powered by Google App Engine
This is Rietveld 408576698