Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / chromeos / extensions / file_system_provider / file_system_provider_api.h
bloba0084ccf065b42d71ea520d3c287901989cd99ac
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 {
14 public:
15 DECLARE_EXTENSION_FUNCTION("fileSystemProvider.mount",
16 FILESYSTEMPROVIDER_MOUNT)
18 protected:
19 ~FileSystemProviderMountFunction() override {}
20 bool RunSync() override;
23 class FileSystemProviderUnmountFunction : public ChromeSyncExtensionFunction {
24 public:
25 DECLARE_EXTENSION_FUNCTION("fileSystemProvider.unmount",
26 FILESYSTEMPROVIDER_UNMOUNT)
28 protected:
29 ~FileSystemProviderUnmountFunction() override {}
30 bool RunSync() override;
33 class FileSystemProviderGetAllFunction : public ChromeSyncExtensionFunction {
34 public:
35 DECLARE_EXTENSION_FUNCTION("fileSystemProvider.getAll",
36 FILESYSTEMPROVIDER_GETALL)
38 protected:
39 ~FileSystemProviderGetAllFunction() override {}
40 bool RunSync() override;
43 class FileSystemProviderGetFunction : public ChromeSyncExtensionFunction {
44 public:
45 DECLARE_EXTENSION_FUNCTION("fileSystemProvider.get", FILESYSTEMPROVIDER_GET)
47 protected:
48 ~FileSystemProviderGetFunction() override {}
49 bool RunSync() override;
52 class FileSystemProviderNotifyFunction : public ChromeAsyncExtensionFunction {
53 public:
54 DECLARE_EXTENSION_FUNCTION("fileSystemProvider.notify",
55 FILESYSTEMPROVIDER_NOTIFY)
57 protected:
58 ~FileSystemProviderNotifyFunction() override {}
59 bool RunAsync() override;
61 private:
62 // Called when notifying is completed.
63 void OnNotifyCompleted(base::File::Error result);
66 class FileSystemProviderInternalUnmountRequestedSuccessFunction
67 : public FileSystemProviderInternalFunction {
68 public:
69 DECLARE_EXTENSION_FUNCTION(
70 "fileSystemProviderInternal.unmountRequestedSuccess",
71 FILESYSTEMPROVIDERINTERNAL_UNMOUNTREQUESTEDSUCCESS)
73 protected:
74 ~FileSystemProviderInternalUnmountRequestedSuccessFunction() override {}
75 bool RunWhenValid() override;
78 class FileSystemProviderInternalGetMetadataRequestedSuccessFunction
79 : public FileSystemProviderInternalFunction {
80 public:
81 DECLARE_EXTENSION_FUNCTION(
82 "fileSystemProviderInternal.getMetadataRequestedSuccess",
83 FILESYSTEMPROVIDERINTERNAL_GETMETADATAREQUESTEDSUCCESS)
85 protected:
86 ~FileSystemProviderInternalGetMetadataRequestedSuccessFunction() override {}
87 bool RunWhenValid() override;
90 class FileSystemProviderInternalGetActionsRequestedSuccessFunction
91 : public FileSystemProviderInternalFunction {
92 public:
93 DECLARE_EXTENSION_FUNCTION(
94 "fileSystemProviderInternal.getActionsRequestedSuccess",
95 FILESYSTEMPROVIDERINTERNAL_GETACTIONSREQUESTEDSUCCESS)
97 protected:
98 ~FileSystemProviderInternalGetActionsRequestedSuccessFunction() override {}
99 bool RunWhenValid() override;
102 class FileSystemProviderInternalReadDirectoryRequestedSuccessFunction
103 : public FileSystemProviderInternalFunction {
104 public:
105 DECLARE_EXTENSION_FUNCTION(
106 "fileSystemProviderInternal.readDirectoryRequestedSuccess",
107 FILESYSTEMPROVIDERINTERNAL_READDIRECTORYREQUESTEDSUCCESS)
109 protected:
110 ~FileSystemProviderInternalReadDirectoryRequestedSuccessFunction() override {}
111 bool RunWhenValid() override;
114 class FileSystemProviderInternalReadFileRequestedSuccessFunction
115 : public FileSystemProviderInternalFunction {
116 public:
117 DECLARE_EXTENSION_FUNCTION(
118 "fileSystemProviderInternal.readFileRequestedSuccess",
119 FILESYSTEMPROVIDERINTERNAL_READFILEREQUESTEDSUCCESS)
121 protected:
122 ~FileSystemProviderInternalReadFileRequestedSuccessFunction() override {}
123 bool RunWhenValid() override;
126 class FileSystemProviderInternalOperationRequestedSuccessFunction
127 : public FileSystemProviderInternalFunction {
128 public:
129 DECLARE_EXTENSION_FUNCTION(
130 "fileSystemProviderInternal.operationRequestedSuccess",
131 FILESYSTEMPROVIDERINTERNAL_OPERATIONREQUESTEDSUCCESS)
133 protected:
134 ~FileSystemProviderInternalOperationRequestedSuccessFunction() override {}
135 bool RunWhenValid() override;
138 class FileSystemProviderInternalOperationRequestedErrorFunction
139 : public FileSystemProviderInternalFunction {
140 public:
141 DECLARE_EXTENSION_FUNCTION(
142 "fileSystemProviderInternal.operationRequestedError",
143 FILESYSTEMPROVIDERINTERNAL_OPERATIONREQUESTEDERROR)
145 protected:
146 ~FileSystemProviderInternalOperationRequestedErrorFunction() override {}
147 bool RunWhenValid() override;
150 } // namespace extensions
152 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_SYSTEM_PROVIDER_FILE_SYSTEM_PROVIDER_API_H_