1 // Copyright 2014 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 // Internal, used by fileSystemProvider's custom bindings. These functions are
6 // called when events' callbacks are invoked.
7 [platforms
=("chromeos"),
8 implemented_in
="chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.h", nodoc
]
9 namespace fileSystemProviderInternal
{
11 // Internal. Success callback of the <code>onUnmountRequested</code>
12 // event. Must be called when unmounting is completed.
13 static
void unmountRequestedSuccess
(DOMString fileSystemId
,
16 // Internal. Error callback of the <code>onUnmountRequested</code>
17 // event. Must be called if unmounting fails.
18 static
void unmountRequestedError
(
19 DOMString fileSystemId
,
21 fileSystemProvider.ProviderError error
);
23 // Internal. Success callback of the <code>onGetMetadataRequested</code>
24 // event. Must be called if metadata is available.
25 static
void getMetadataRequestedSuccess
(
26 DOMString fileSystemId
,
28 fileSystemProvider.EntryMetadata metadata
);
30 // Internal. Error callback of the <code>onGetMetadataRequested</code>
31 // event. Must be called when obtaining metadata fails.
32 static
void getMetadataRequestedError
(
33 DOMString fileSystemId
,
35 fileSystemProvider.ProviderError error
);
37 // Internal. Success callback of the <code>onReadDirectoryRequested</code>
38 // event. Can be called multiple times per request.
39 static
void readDirectoryRequestedSuccess
(
40 DOMString fileSystemId
,
42 fileSystemProvider.EntryMetadata
[] entries
,
45 // Internal. Error callback of the <code>onReadDirectoryRequested</code>
46 // event. Must be called when reading a directory fails.
47 static
void readDirectoryRequestedError
(
48 DOMString fileSystemId
,
50 fileSystemProvider.ProviderError error
);
52 // Internal. Success callback of the <code>onOpenFileRequested</code> event.
53 // Must be called, when opening succeeds.
54 static
void openFileRequestedSuccess
(
55 DOMString fileSystemId
,
58 // Internal. Error callback of the <code>onOpenFileRequested</code> event.
59 // Must be called when opening fails.
60 static
void openFileRequestedError
(
61 DOMString fileSystemId
,
63 fileSystemProvider.ProviderError error
);
65 // Internal. Success callback of the <code>onCloseFileRequested</code>
66 // event. Must be called, when closing succeeds.
67 static
void closeFileRequestedSuccess
(
68 DOMString fileSystemId
,
71 // Internal. Error callback of the <code>onCloseFileRequested</code> event.
72 // Must be called when closing fails.
73 static
void closeFileRequestedError
(
74 DOMString fileSystemId
,
76 fileSystemProvider.ProviderError error
);
78 // Internal. Success callback of the <code>onReadFileRequested</code>
79 // event. Can be called multiple times per request.
80 static
void readFileRequestedSuccess
(
81 DOMString fileSystemId
,
86 // Internal. Error callback of the <code>onReadFileRequested</code>
87 // event. Must be called when reading a file fails.
88 static
void readFileRequestedError
(
89 DOMString fileSystemId
,
91 fileSystemProvider.ProviderError error
);