| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 protected: | 210 protected: |
| 211 virtual ~CancelFileDialogFunction() {} | 211 virtual ~CancelFileDialogFunction() {} |
| 212 | 212 |
| 213 // AsyncExtensionFunction overrides. | 213 // AsyncExtensionFunction overrides. |
| 214 virtual bool RunImpl() OVERRIDE; | 214 virtual bool RunImpl() OVERRIDE; |
| 215 | 215 |
| 216 private: | 216 private: |
| 217 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.cancelDialog"); | 217 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.cancelDialog"); |
| 218 }; | 218 }; |
| 219 | 219 |
| 220 // Unmounts selected device. Expects volume's device path as an argument. | 220 // Mount a device or a file. |
| 221 class UnmountVolumeFunction | 221 class AddMountFunction |
| 222 : public SyncExtensionFunction { | 222 : public SyncExtensionFunction { |
| 223 public: | 223 public: |
| 224 UnmountVolumeFunction(); | 224 AddMountFunction(); |
| 225 | 225 |
| 226 protected: | 226 protected: |
| 227 virtual ~UnmountVolumeFunction(); | 227 virtual ~AddMountFunction(); |
| 228 | 228 |
| 229 virtual bool RunImpl() OVERRIDE; | 229 virtual bool RunImpl() OVERRIDE; |
| 230 | 230 |
| 231 private: | 231 private: |
| 232 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.unmountVolume"); | 232 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addMount"); |
| 233 }; |
| 234 |
| 235 // Unmounts selected device. Expects mount point path as an argument. |
| 236 class RemoveMountFunction |
| 237 : public SyncExtensionFunction { |
| 238 public: |
| 239 RemoveMountFunction(); |
| 240 |
| 241 protected: |
| 242 virtual ~RemoveMountFunction(); |
| 243 |
| 244 virtual bool RunImpl() OVERRIDE; |
| 245 |
| 246 private: |
| 247 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.removeMount"); |
| 248 }; |
| 249 |
| 250 class GetMountPointsFunction |
| 251 : public SyncExtensionFunction { |
| 252 public: |
| 253 GetMountPointsFunction(); |
| 254 |
| 255 protected: |
| 256 virtual ~GetMountPointsFunction(); |
| 257 |
| 258 virtual bool RunImpl() OVERRIDE; |
| 259 |
| 260 private: |
| 261 #ifdef OS_CHROMEOS |
| 262 base::DictionaryValue* MountPointToValue( |
| 263 const chromeos::MountLibrary::MountPointInfo& mount_point_info, |
| 264 chromeos::MountLibrary* mount_lib); |
| 265 #endif |
| 266 |
| 267 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getMountPoints"); |
| 233 }; | 268 }; |
| 234 | 269 |
| 235 // Retrieves devices meta-data. Expects volume's device path as an argument. | 270 // Retrieves devices meta-data. Expects volume's device path as an argument. |
| 236 class GetVolumeMetadataFunction | 271 class GetVolumeMetadataFunction |
| 237 : public SyncExtensionFunction { | 272 : public SyncExtensionFunction { |
| 238 public: | 273 public: |
| 239 GetVolumeMetadataFunction(); | 274 GetVolumeMetadataFunction(); |
| 240 | 275 |
| 241 protected: | 276 protected: |
| 242 virtual ~GetVolumeMetadataFunction(); | 277 virtual ~GetVolumeMetadataFunction(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 260 virtual ~FileDialogStringsFunction() {} | 295 virtual ~FileDialogStringsFunction() {} |
| 261 | 296 |
| 262 // SyncExtensionFunction overrides. | 297 // SyncExtensionFunction overrides. |
| 263 virtual bool RunImpl() OVERRIDE; | 298 virtual bool RunImpl() OVERRIDE; |
| 264 | 299 |
| 265 private: | 300 private: |
| 266 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings"); | 301 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings"); |
| 267 }; | 302 }; |
| 268 | 303 |
| 269 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ | 304 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ |
| OLD | NEW |