summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_file_browser_private_api.h
diff options
context:
space:
mode:
authorzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-25 06:19:02 +0000
committerzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-25 06:19:02 +0000
commit3976e5dfe1b2c23bb8e573f34d1da1a05403e41f (patch)
tree858230a49fceabe22c886a1a70c3a771f3708560 /chrome/browser/extensions/extension_file_browser_private_api.h
parent434da4e43076f7cdb7faf899c2841b6829c01541 (diff)
downloadchromium_src-3976e5dfe1b2c23bb8e573f34d1da1a05403e41f.zip
chromium_src-3976e5dfe1b2c23bb8e573f34d1da1a05403e41f.tar.gz
chromium_src-3976e5dfe1b2c23bb8e573f34d1da1a05403e41f.tar.bz2
Revert 93838 - Merged already reviewed CLs for r/o zip support in ChromeOS file browser:
Re-landing http://codereview.chromium.org/7457001: Adding support for mount point different from removable devices to MountLibrary (work in progress..have to add GetMountPoints support) tested on ChromeOS with these three patches: http://gerrit.chromium.org/gerrit/#change,4447 http://gerrit.chromium.org/gerrit/#change,4449 http://gerrit.chromium.org/gerrit/#change,4544 http://codereview.chromium.org/7471039/: UI for mounting/unmounting archive files. BUG=chromium-os:17673, chromium-os:17783 TEST=Made sure mounting devices still works and that MountCompleted event gets through to file_browser_event_router (checking ui and chrome logs for mount completed entries) TBR=tbarzic, dgozman Review URL: http://codereview.chromium.org/7488044 TBR=zelidrag@chromium.org Review URL: http://codereview.chromium.org/7495024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_file_browser_private_api.h')
-rw-r--r--chrome/browser/extensions/extension_file_browser_private_api.h85
1 files changed, 22 insertions, 63 deletions
diff --git a/chrome/browser/extensions/extension_file_browser_private_api.h b/chrome/browser/extensions/extension_file_browser_private_api.h
index 69bd537..065b9e2 100644
--- a/chrome/browser/extensions/extension_file_browser_private_api.h
+++ b/chrome/browser/extensions/extension_file_browser_private_api.h
@@ -118,24 +118,24 @@ class ExecuteTasksFileBrowserFunction : public AsyncExtensionFunction {
};
// Parent class for the chromium extension APIs for the file dialog.
-class FileBrowserFunction
+class FileDialogFunction
: public AsyncExtensionFunction {
public:
- FileBrowserFunction();
+ FileDialogFunction();
protected:
typedef std::vector<GURL> UrlList;
typedef std::vector<FilePath> FilePathList;
- virtual ~FileBrowserFunction();
+ virtual ~FileDialogFunction();
// Convert virtual paths to local paths on the file thread.
void GetLocalPathsOnFileThread(const UrlList& file_urls,
- void* context);
+ const std::string& internal_task_id);
// Callback with converted local paths.
virtual void GetLocalPathsResponseOnUIThread(const FilePathList& files,
- void* context) { NOTREACHED(); }
+ const std::string& internal_task_id) {}
// Figure out the tab_id of the hosting tab.
int32 GetTabId() const;
@@ -143,7 +143,7 @@ class FileBrowserFunction
// Select a single file. Closes the dialog window.
class SelectFileFunction
- : public FileBrowserFunction {
+ : public FileDialogFunction {
public:
SelectFileFunction() {}
@@ -153,9 +153,9 @@ class SelectFileFunction
// AsyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
- // FileBrowserFunction overrides.
- virtual void GetLocalPathsResponseOnUIThread(const FilePathList& files,
- void* context) OVERRIDE;
+ // FileDialogFunction overrides.
+ virtual void GetLocalPathsResponseOnUIThread(
+ const FilePathList& files, const std::string& internal_task_id) OVERRIDE;
private:
DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.selectFile");
@@ -163,7 +163,7 @@ class SelectFileFunction
// View multiple selected files. Window stays open.
class ViewFilesFunction
- : public FileBrowserFunction {
+ : public FileDialogFunction {
public:
ViewFilesFunction();
@@ -173,9 +173,9 @@ class ViewFilesFunction
// AsyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
- // FileBrowserFunction overrides.
+ // FileDialogFunction overrides.
virtual void GetLocalPathsResponseOnUIThread(
- const FilePathList& files, void* context) OVERRIDE;
+ const FilePathList& files, const std::string& internal_task_id) OVERRIDE;
private:
DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.viewFiles");
@@ -183,7 +183,7 @@ class ViewFilesFunction
// Select multiple files. Closes the dialog window.
class SelectFilesFunction
- : public FileBrowserFunction {
+ : public FileDialogFunction {
public:
SelectFilesFunction();
@@ -193,9 +193,9 @@ class SelectFilesFunction
// AsyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
- // FileBrowserFunction overrides.
+ // FileDialogFunction overrides.
virtual void GetLocalPathsResponseOnUIThread(
- const FilePathList& files, void* context) OVERRIDE;
+ const FilePathList& files, const std::string& internal_task_id) OVERRIDE;
private:
DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.selectFiles");
@@ -203,7 +203,7 @@ class SelectFilesFunction
// Cancel file selection Dialog. Closes the dialog window.
class CancelFileDialogFunction
- : public FileBrowserFunction {
+ : public FileDialogFunction {
public:
CancelFileDialogFunction() {}
@@ -217,60 +217,19 @@ class CancelFileDialogFunction
DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.cancelDialog");
};
-// Mount a device or a file.
-class AddMountFunction
- : public FileBrowserFunction {
- public:
- AddMountFunction();
-
- protected:
- virtual ~AddMountFunction();
-
- virtual bool RunImpl() OVERRIDE;
-
- // FileBrowserFunction overrides.
- virtual void GetLocalPathsResponseOnUIThread(
- const FilePathList& files, void* context) OVERRIDE;
-
- private:
- struct MountParamaters {
- MountParamaters(const std::string& type,
- const chromeos::MountPathOptions& options)
- : mount_type(type), mount_options(options) {}
- std::string mount_type;
- chromeos::MountPathOptions mount_options;
- };
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addMount");
-};
-
-// Unmounts selected device. Expects mount point path as an argument.
-class RemoveMountFunction
+// Unmounts selected device. Expects volume's device path as an argument.
+class UnmountVolumeFunction
: public SyncExtensionFunction {
- public:
- RemoveMountFunction();
-
- protected:
- virtual ~RemoveMountFunction();
-
- virtual bool RunImpl() OVERRIDE;
-
- private:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.removeMount");
-};
-
-class GetMountPointsFunction
- : public AsyncExtensionFunction {
- public:
- GetMountPointsFunction();
+ public:
+ UnmountVolumeFunction();
protected:
- virtual ~GetMountPointsFunction();
+ virtual ~UnmountVolumeFunction();
virtual bool RunImpl() OVERRIDE;
private:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getMountPoints");
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.unmountVolume");
};
// Retrieves devices meta-data. Expects volume's device path as an argument.