file_system_provider_api.h revision 116680a4aac90f2aa7413d9095a592090648e557
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. 4 5#ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_SYSTEM_PROVIDER_FILE_SYSTEM_PROVIDER_API_H_ 6#define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_SYSTEM_PROVIDER_FILE_SYSTEM_PROVIDER_API_H_ 7 8#include "chrome/browser/chromeos/extensions/file_system_provider/provider_function.h" 9#include "chrome/browser/extensions/chrome_extension_function.h" 10 11namespace extensions { 12 13class FileSystemProviderMountFunction : public ChromeSyncExtensionFunction { 14 public: 15 DECLARE_EXTENSION_FUNCTION("fileSystemProvider.mount", 16 FILESYSTEMPROVIDER_MOUNT) 17 18 protected: 19 virtual ~FileSystemProviderMountFunction() {} 20 virtual bool RunSync() OVERRIDE; 21}; 22 23class FileSystemProviderUnmountFunction : public ChromeSyncExtensionFunction { 24 public: 25 DECLARE_EXTENSION_FUNCTION("fileSystemProvider.unmount", 26 FILESYSTEMPROVIDER_UNMOUNT) 27 28 protected: 29 virtual ~FileSystemProviderUnmountFunction() {} 30 virtual bool RunSync() OVERRIDE; 31}; 32 33class FileSystemProviderInternalUnmountRequestedSuccessFunction 34 : public FileSystemProviderInternalFunction { 35 public: 36 DECLARE_EXTENSION_FUNCTION( 37 "fileSystemProviderInternal.unmountRequestedSuccess", 38 FILESYSTEMPROVIDERINTERNAL_GETMETADATAREQUESTEDSUCCESS) 39 40 protected: 41 virtual ~FileSystemProviderInternalUnmountRequestedSuccessFunction() {} 42 virtual bool RunWhenValid() OVERRIDE; 43}; 44 45class FileSystemProviderInternalGetMetadataRequestedSuccessFunction 46 : public FileSystemProviderInternalFunction { 47 public: 48 DECLARE_EXTENSION_FUNCTION( 49 "fileSystemProviderInternal.getMetadataRequestedSuccess", 50 FILESYSTEMPROVIDERINTERNAL_GETMETADATAREQUESTEDSUCCESS) 51 52 protected: 53 virtual ~FileSystemProviderInternalGetMetadataRequestedSuccessFunction() {} 54 virtual bool RunWhenValid() OVERRIDE; 55}; 56 57class FileSystemProviderInternalReadDirectoryRequestedSuccessFunction 58 : public FileSystemProviderInternalFunction { 59 public: 60 DECLARE_EXTENSION_FUNCTION( 61 "fileSystemProviderInternal.readDirectoryRequestedSuccess", 62 FILESYSTEMPROVIDERINTERNAL_READDIRECTORYREQUESTEDSUCCESS) 63 64 protected: 65 virtual ~FileSystemProviderInternalReadDirectoryRequestedSuccessFunction() {} 66 virtual bool RunWhenValid() OVERRIDE; 67}; 68 69class FileSystemProviderInternalReadFileRequestedSuccessFunction 70 : public FileSystemProviderInternalFunction { 71 public: 72 DECLARE_EXTENSION_FUNCTION( 73 "fileSystemProviderInternal.readFileRequestedSuccess", 74 FILESYSTEMPROVIDERINTERNAL_READFILEREQUESTEDSUCCESS) 75 76 protected: 77 virtual ~FileSystemProviderInternalReadFileRequestedSuccessFunction() {} 78 virtual bool RunWhenValid() OVERRIDE; 79}; 80 81class FileSystemProviderInternalOperationRequestedSuccessFunction 82 : public FileSystemProviderInternalFunction { 83 public: 84 DECLARE_EXTENSION_FUNCTION( 85 "fileSystemProviderInternal.operationRequestedSuccess", 86 FILESYSTEMPROVIDERINTERNAL_OPERATIONREQUESTEDSUCCESS) 87 88 protected: 89 virtual ~FileSystemProviderInternalOperationRequestedSuccessFunction() {} 90 virtual bool RunWhenValid() OVERRIDE; 91}; 92 93class FileSystemProviderInternalOperationRequestedErrorFunction 94 : public FileSystemProviderInternalFunction { 95 public: 96 DECLARE_EXTENSION_FUNCTION( 97 "fileSystemProviderInternal.operationRequestedError", 98 FILESYSTEMPROVIDERINTERNAL_OPERATIONREQUESTEDERROR) 99 100 protected: 101 virtual ~FileSystemProviderInternalOperationRequestedErrorFunction() {} 102 virtual bool RunWhenValid() OVERRIDE; 103}; 104 105} // namespace extensions 106 107#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_SYSTEM_PROVIDER_FILE_SYSTEM_PROVIDER_API_H_ 108