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 #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_
8 #include "chrome/browser/chromeos/extensions/file_system_provider/provider_function.h"
9 #include "chrome/browser/extensions/chrome_extension_function.h"
11 namespace extensions
{
13 class FileSystemProviderMountFunction
: public ChromeSyncExtensionFunction
{
15 DECLARE_EXTENSION_FUNCTION("fileSystemProvider.mount",
16 FILESYSTEMPROVIDER_MOUNT
)
19 virtual ~FileSystemProviderMountFunction() {}
20 virtual bool RunSync() override
;
23 class FileSystemProviderUnmountFunction
: public ChromeSyncExtensionFunction
{
25 DECLARE_EXTENSION_FUNCTION("fileSystemProvider.unmount",
26 FILESYSTEMPROVIDER_UNMOUNT
)
29 virtual ~FileSystemProviderUnmountFunction() {}
30 virtual bool RunSync() override
;
33 class FileSystemProviderGetAllFunction
: public ChromeSyncExtensionFunction
{
35 DECLARE_EXTENSION_FUNCTION("fileSystemProvider.getAll",
36 FILESYSTEMPROVIDER_GETALL
)
39 virtual ~FileSystemProviderGetAllFunction() {}
40 virtual bool RunSync() override
;
43 class FileSystemProviderNotifyFunction
: public ChromeSyncExtensionFunction
{
45 DECLARE_EXTENSION_FUNCTION("fileSystemProvider.notify",
46 FILESYSTEMPROVIDER_NOTIFY
)
49 virtual ~FileSystemProviderNotifyFunction() {}
50 virtual bool RunSync() override
;
53 class FileSystemProviderInternalUnmountRequestedSuccessFunction
54 : public FileSystemProviderInternalFunction
{
56 DECLARE_EXTENSION_FUNCTION(
57 "fileSystemProviderInternal.unmountRequestedSuccess",
58 FILESYSTEMPROVIDERINTERNAL_GETMETADATAREQUESTEDSUCCESS
)
61 virtual ~FileSystemProviderInternalUnmountRequestedSuccessFunction() {}
62 virtual bool RunWhenValid() override
;
65 class FileSystemProviderInternalGetMetadataRequestedSuccessFunction
66 : public FileSystemProviderInternalFunction
{
68 DECLARE_EXTENSION_FUNCTION(
69 "fileSystemProviderInternal.getMetadataRequestedSuccess",
70 FILESYSTEMPROVIDERINTERNAL_GETMETADATAREQUESTEDSUCCESS
)
73 virtual ~FileSystemProviderInternalGetMetadataRequestedSuccessFunction() {}
74 virtual bool RunWhenValid() override
;
77 class FileSystemProviderInternalReadDirectoryRequestedSuccessFunction
78 : public FileSystemProviderInternalFunction
{
80 DECLARE_EXTENSION_FUNCTION(
81 "fileSystemProviderInternal.readDirectoryRequestedSuccess",
82 FILESYSTEMPROVIDERINTERNAL_READDIRECTORYREQUESTEDSUCCESS
)
85 virtual ~FileSystemProviderInternalReadDirectoryRequestedSuccessFunction() {}
86 virtual bool RunWhenValid() override
;
89 class FileSystemProviderInternalReadFileRequestedSuccessFunction
90 : public FileSystemProviderInternalFunction
{
92 DECLARE_EXTENSION_FUNCTION(
93 "fileSystemProviderInternal.readFileRequestedSuccess",
94 FILESYSTEMPROVIDERINTERNAL_READFILEREQUESTEDSUCCESS
)
97 virtual ~FileSystemProviderInternalReadFileRequestedSuccessFunction() {}
98 virtual bool RunWhenValid() override
;
101 class FileSystemProviderInternalOperationRequestedSuccessFunction
102 : public FileSystemProviderInternalFunction
{
104 DECLARE_EXTENSION_FUNCTION(
105 "fileSystemProviderInternal.operationRequestedSuccess",
106 FILESYSTEMPROVIDERINTERNAL_OPERATIONREQUESTEDSUCCESS
)
109 virtual ~FileSystemProviderInternalOperationRequestedSuccessFunction() {}
110 virtual bool RunWhenValid() override
;
113 class FileSystemProviderInternalOperationRequestedErrorFunction
114 : public FileSystemProviderInternalFunction
{
116 DECLARE_EXTENSION_FUNCTION(
117 "fileSystemProviderInternal.operationRequestedError",
118 FILESYSTEMPROVIDERINTERNAL_OPERATIONREQUESTEDERROR
)
121 virtual ~FileSystemProviderInternalOperationRequestedErrorFunction() {}
122 virtual bool RunWhenValid() override
;
125 } // namespace extensions
127 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_SYSTEM_PROVIDER_FILE_SYSTEM_PROVIDER_API_H_