Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / common / extensions / api / file_system_provider_internal.idl
blobaf3db413d206e6be0ee4c1796a12d66d585d5981
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 [implemented_in="chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.h", nodoc]
8 namespace fileSystemProviderInternal {
9 interface Functions {
10 // Internal. Success callback of the <code>onUnmountRequested</code>
11 // event. Must be called when unmounting is completed.
12 static void unmountRequestedSuccess(
13 DOMString fileSystemId,
14 long requestId,
15 long executionTime);
17 // Internal. Success callback of the <code>onGetMetadataRequested</code>
18 // event. Must be called if metadata is available.
19 static void getMetadataRequestedSuccess(
20 DOMString fileSystemId,
21 long requestId,
22 fileSystemProvider.EntryMetadata metadata,
23 long executionTime);
25 // Internal. Success callback of the <code>onGetActionsRequested</code>
26 // event. Must be called if actions are available.
27 static void getActionsRequestedSuccess(
28 DOMString fileSystemId,
29 long requestId,
30 fileSystemProvider.Action[] actions,
31 long executionTime);
33 // Internal. Success callback of the <code>onReadDirectoryRequested</code>
34 // event. Can be called multiple times per request.
35 static void readDirectoryRequestedSuccess(
36 DOMString fileSystemId,
37 long requestId,
38 fileSystemProvider.EntryMetadata[] entries,
39 boolean hasMore,
40 long executionTime);
42 // Internal. Success callback of the <code>onReadFileRequested</code>
43 // event. Can be called multiple times per request.
44 static void readFileRequestedSuccess(
45 DOMString fileSystemId,
46 long requestId,
47 ArrayBuffer data,
48 boolean hasMore,
49 long executionTime);
51 // Internal. Success callback of all of the operation requests, which do not
52 // return any value. Must be called in case of a success.
53 static void operationRequestedSuccess(
54 DOMString fileSystemId,
55 long requestId,
56 long executionTime);
58 // Internal. Error callback of all of the operation requests. Must be called
59 // if an operation fails.
60 static void operationRequestedError(
61 DOMString fileSystemId,
62 long requestId,
63 fileSystemProvider.ProviderError error,
64 long executionTime);