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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_private_api.h

Issue 11309014: File manager: support for zipping selected files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compiler warning: declare base::FileDescriptor a struct, not a class. The struct is put after t… Created 8 years, 1 month 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/app/generated_resources.grd ('k') | chrome/browser/chromeos/extensions/file_browser_private_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_browser_private_api.h
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.h b/chrome/browser/chromeos/extensions/file_browser_private_api.h
index e70c8ba1a1e41a9052ef939a089a7b8d70344d07..fe34dbf586181933f2252d1e55441fb85dabd472 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.h
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.h
@@ -16,6 +16,7 @@
#include "chrome/browser/chromeos/drive/drive_cache.h"
#include "chrome/browser/chromeos/drive/drive_file_error.h"
#include "chrome/browser/chromeos/extensions/file_browser_event_router.h"
+#include "chrome/browser/chromeos/extensions/zip_file_creator.h"
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/prefs/pref_service.h"
#include "googleurl/src/url_util.h"
@@ -783,4 +784,30 @@ class RequestDirectoryRefreshFunction : public SyncExtensionFunction {
virtual bool RunImpl() OVERRIDE;
};
+// Create a zip file for the selected files.
+class ZipSelectionFunction : public FileBrowserFunction,
+ public extensions::ZipFileCreator::Observer {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.zipSelection");
+
+ ZipSelectionFunction();
+
+ protected:
+ virtual ~ZipSelectionFunction();
+
+ // AsyncExtensionFunction overrides.
+ virtual bool RunImpl() OVERRIDE;
+
+ // extensions::ZipFileCreator::Delegate overrides.
+ virtual void OnZipDone(bool success) OVERRIDE;
+
+ private:
+ // A callback method to handle the result of
+ // GetLocalPathsOnFileThreadAndRunCallbackOnUIThread.
+ void GetLocalPathsResponseOnUIThread(const std::string dest_name,
+ const SelectedFileInfoList& files);
+
+ scoped_refptr<extensions::ZipFileCreator> zip_file_creator_;
+};
+
#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chromeos/extensions/file_browser_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698