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 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getMountPoints"); |
233 }; | 262 }; |
234 | 263 |
235 // Retrieves devices meta-data. Expects volume's device path as an argument. | 264 // Retrieves devices meta-data. Expects volume's device path as an argument. |
236 class GetVolumeMetadataFunction | 265 class GetVolumeMetadataFunction |
237 : public SyncExtensionFunction { | 266 : public SyncExtensionFunction { |
238 public: | 267 public: |
239 GetVolumeMetadataFunction(); | 268 GetVolumeMetadataFunction(); |
240 | 269 |
241 protected: | 270 protected: |
242 virtual ~GetVolumeMetadataFunction(); | 271 virtual ~GetVolumeMetadataFunction(); |
243 | 272 |
244 virtual bool RunImpl() OVERRIDE; | 273 virtual bool RunImpl() OVERRIDE; |
245 | 274 |
246 private: | 275 private: |
247 #ifdef OS_CHROMEOS | 276 #ifdef OS_CHROMEOS |
248 const std::string& DeviceTypeToString(chromeos::DeviceType type); | 277 const std::string& DeviceTypeToString(chromeos::DeviceType type); |
249 #endif | 278 #endif |
250 | 279 |
251 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getVolumeMetadata"); | 280 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getVolumeMetadata"); |
252 }; | 281 }; |
| 282 /* |
| 283 class MountVolumeFunction |
| 284 : public AsyncExtensionFunction, |
| 285 public MountLibrary::MountRequestDelegate { |
| 286 public: |
| 287 MountVolumeFunction(); |
253 | 288 |
| 289 MountCompleted(); |
| 290 |
| 291 protected: |
| 292 virtual ~FormatVolumeFunction(); |
| 293 |
| 294 virtual bool RunImpl() OVERRIDE; |
| 295 |
| 296 private: |
| 297 |
| 298 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.mountVolume"); |
| 299 }; |
| 300 */ |
254 // File Dialog Strings. | 301 // File Dialog Strings. |
255 class FileDialogStringsFunction : public SyncExtensionFunction { | 302 class FileDialogStringsFunction : public SyncExtensionFunction { |
256 public: | 303 public: |
257 FileDialogStringsFunction() {} | 304 FileDialogStringsFunction() {} |
258 | 305 |
259 protected: | 306 protected: |
260 virtual ~FileDialogStringsFunction() {} | 307 virtual ~FileDialogStringsFunction() {} |
261 | 308 |
262 // SyncExtensionFunction overrides. | 309 // SyncExtensionFunction overrides. |
263 virtual bool RunImpl() OVERRIDE; | 310 virtual bool RunImpl() OVERRIDE; |
264 | 311 |
265 private: | 312 private: |
266 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings"); | 313 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings"); |
267 }; | 314 }; |
268 | 315 |
269 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ | 316 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ |
OLD | NEW |