1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file provides task related API functions.
7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_
8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_
12 #include "base/files/file_path.h"
13 #include "chrome/browser/chromeos/drive/file_errors.h"
14 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h"
17 struct SelectedFileInfo;
20 namespace extensions {
22 // Implements chrome.fileBrowserPrivate.addMount method.
23 // Mounts removable devices and archive files.
24 class FileBrowserPrivateAddMountFunction : public LoggedAsyncExtensionFunction {
26 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.addMount",
27 FILEBROWSERPRIVATE_ADDMOUNT)
30 virtual ~FileBrowserPrivateAddMountFunction() {}
32 // AsyncExtensionFunction overrides.
33 virtual bool RunAsync() OVERRIDE;
36 // Part of Run(). Called after MarkCacheFielAsMounted for Drive File System.
37 // (or directly called from RunAsync() for other file system).
38 void RunAfterMarkCacheFileAsMounted(const base::FilePath& display_name,
39 drive::FileError error,
40 const base::FilePath& file_path);
43 // Implements chrome.fileBrowserPrivate.removeMount method.
44 // Unmounts selected volume. Expects volume id as an argument.
45 class FileBrowserPrivateRemoveMountFunction
46 : public LoggedAsyncExtensionFunction {
48 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.removeMount",
49 FILEBROWSERPRIVATE_REMOVEMOUNT)
52 virtual ~FileBrowserPrivateRemoveMountFunction() {}
54 // AsyncExtensionFunction overrides.
55 virtual bool RunAsync() OVERRIDE;
58 // Implements chrome.fileBrowserPrivate.getVolumeMetadataList method.
59 class FileBrowserPrivateGetVolumeMetadataListFunction
60 : public LoggedAsyncExtensionFunction {
62 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getVolumeMetadataList",
63 FILEBROWSERPRIVATE_GETVOLUMEMETADATALIST)
66 virtual ~FileBrowserPrivateGetVolumeMetadataListFunction() {}
68 // AsyncExtensionFunction overrides.
69 virtual bool RunAsync() OVERRIDE;
72 } // namespace extensions
74 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_