| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 protected: | 226 protected: |
| 227 virtual ~AddMountFunction(); | 227 virtual ~AddMountFunction(); |
| 228 | 228 |
| 229 virtual bool RunImpl() OVERRIDE; | 229 virtual bool RunImpl() OVERRIDE; |
| 230 | 230 |
| 231 // FileBrowserFunction overrides. | 231 // FileBrowserFunction overrides. |
| 232 virtual void GetLocalPathsResponseOnUIThread(const FilePathList& files, | 232 virtual void GetLocalPathsResponseOnUIThread(const FilePathList& files, |
| 233 void* context) OVERRIDE; | 233 void* context) OVERRIDE; |
| 234 | 234 |
| 235 private: | 235 private: |
| 236 #if defined(OS_CHROMEOS) | |
| 237 struct MountParamaters { | 236 struct MountParamaters { |
| 238 MountParamaters(const std::string& type, | 237 MountParamaters(const std::string& type, |
| 239 const chromeos::MountPathOptions& options) | 238 const chromeos::MountPathOptions& options) |
| 240 : mount_type(type), mount_options(options) {} | 239 : mount_type(type), mount_options(options) {} |
| 241 ~MountParamaters() {} | 240 ~MountParamaters() {} |
| 242 std::string mount_type; | 241 std::string mount_type; |
| 243 chromeos::MountPathOptions mount_options; | 242 chromeos::MountPathOptions mount_options; |
| 244 }; | 243 }; |
| 245 #endif | |
| 246 | 244 |
| 247 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addMount"); | 245 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addMount"); |
| 248 }; | 246 }; |
| 249 | 247 |
| 250 // Unmounts selected device. Expects mount point path as an argument. | 248 // Unmounts selected device. Expects mount point path as an argument. |
| 251 class RemoveMountFunction | 249 class RemoveMountFunction |
| 252 : public FileBrowserFunction { | 250 : public FileBrowserFunction { |
| 253 public: | 251 public: |
| 254 RemoveMountFunction(); | 252 RemoveMountFunction(); |
| 255 | 253 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 : public SyncExtensionFunction { | 301 : public SyncExtensionFunction { |
| 304 public: | 302 public: |
| 305 GetVolumeMetadataFunction(); | 303 GetVolumeMetadataFunction(); |
| 306 | 304 |
| 307 protected: | 305 protected: |
| 308 virtual ~GetVolumeMetadataFunction(); | 306 virtual ~GetVolumeMetadataFunction(); |
| 309 | 307 |
| 310 virtual bool RunImpl() OVERRIDE; | 308 virtual bool RunImpl() OVERRIDE; |
| 311 | 309 |
| 312 private: | 310 private: |
| 313 #if defined(OS_CHROMEOS) | 311 #ifdef OS_CHROMEOS |
| 314 const std::string& DeviceTypeToString(chromeos::DeviceType type); | 312 const std::string& DeviceTypeToString(chromeos::DeviceType type); |
| 315 #endif | 313 #endif |
| 316 | 314 |
| 317 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getVolumeMetadata"); | 315 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getVolumeMetadata"); |
| 318 }; | 316 }; |
| 319 | 317 |
| 320 // File Dialog Strings. | 318 // File Dialog Strings. |
| 321 class FileDialogStringsFunction : public SyncExtensionFunction { | 319 class FileDialogStringsFunction : public SyncExtensionFunction { |
| 322 public: | 320 public: |
| 323 FileDialogStringsFunction() {} | 321 FileDialogStringsFunction() {} |
| 324 | 322 |
| 325 protected: | 323 protected: |
| 326 virtual ~FileDialogStringsFunction() {} | 324 virtual ~FileDialogStringsFunction() {} |
| 327 | 325 |
| 328 // SyncExtensionFunction overrides. | 326 // SyncExtensionFunction overrides. |
| 329 virtual bool RunImpl() OVERRIDE; | 327 virtual bool RunImpl() OVERRIDE; |
| 330 | 328 |
| 331 private: | 329 private: |
| 332 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings"); | 330 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings"); |
| 333 }; | 331 }; |
| 334 | 332 |
| 335 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ | 333 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ |
| OLD | NEW |