summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/file_manager_private_internal.idl
blob: 404a19d22693f8d775ce8c6f293fe63396e52fe3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Internal, used by fileManagerPrivate's custom bindings.
[platforms=("chromeos"),
 implemented_in="chrome/browser/chromeos/extensions/file_manager/file_manager_private_api_functions.h",
  use_movable_types=true]
namespace fileManagerPrivateInternal {
  // Entry information that renderers need to create an Entry instance.
  dictionary EntryDescription {
    DOMString fileSystemName;
    DOMString fileSystemRoot;
    DOMString fileFullPath;
    boolean fileIsDirectory;
  };

  callback SimpleCallback = void();
  callback ResolveIsolatedEntriesCallback = void(EntryDescription[] entries);
  callback GetEntryPropertiesCallback = void(
      fileManagerPrivate.EntryProperties[] entryProperties);
  callback AddFileWatchCallback = void(optional boolean success);
  callback RemoveFileWatchCallback = void(optional boolean success);
  callback GetCustomActionsCallback = void(fileSystemProvider.Action[] actions);
  callback ComputeChecksumCallback = void(DOMString checksum);
  callback GetMimeTypeCallback = void(DOMString result);
  callback ExecuteTaskCallback = void(fileManagerPrivate.TaskResult result);
  callback GetFileTasksCallback = void(fileManagerPrivate.FileTask[] tasks);
  callback GetUrlCallback = void(DOMString url);
  callback GetUrlCallback = void(DOMString url);
  callback StartCopyCallback = void(long copyId);
  callback ZipSelectionCallback = void(optional boolean success);
  callback ValidatePathNameLengthCallback = void(boolean result);

  interface Functions {
    static void resolveIsolatedEntries(DOMString[] urls,
                                       ResolveIsolatedEntriesCallback callback);
    static void getEntryProperties(
        DOMString[] urls,
        fileManagerPrivate.EntryPropertyName[] names,
        GetEntryPropertiesCallback callback);
    static void addFileWatch(
        DOMString url,
        AddFileWatchCallback callback);
    static void removeFileWatch(
        DOMString url,
        RemoveFileWatchCallback callback);
    static void getCustomActions(DOMString[] urls,
                                 GetCustomActionsCallback callback);
    static void executeCustomAction(DOMString[] urls,
                                    DOMString actionId,
                                    SimpleCallback callback);
    static void computeChecksum(DOMString url,
                                ComputeChecksumCallback callback);
    static void getMimeType(DOMString url,
                            GetMimeTypeCallback callback);
    static void pinDriveFile(DOMString url,
                             boolean pin,
                             SimpleCallback callback);
    static void executeTask(DOMString taskId,
                            DOMString[] urls,
                            ExecuteTaskCallback callback);
    static void setDefaultTask(DOMString taskId,
                               DOMString[] urls,
                               DOMString[] mimeTypes,
                               SimpleCallback callback);
    static void getFileTasks(DOMString[] urls,
                             GetFileTasksCallback callback);
    static void getShareUrl(DOMString  url, GetUrlCallback callback);
    static void getDownloadUrl(DOMString url, GetUrlCallback callback);
    static void requestDriveShare(DOMString url,
                                fileManagerPrivate.DriveShareType shareType,
                                SimpleCallback callback);
    static void setEntryTag(DOMString url,
                            fileManagerPrivate.EntryTagVisibility visibility,
                            DOMString key,
                            DOMString value,
                            SimpleCallback callback);
    static void cancelFileTransfers(DOMString[] urls,
                                    optional SimpleCallback callback);
    static void startCopy(DOMString url,
                          DOMString parentUrl,
                          DOMString newName,
                          StartCopyCallback callback);
    static void zipSelection(DOMString parentUrl,
                             DOMString[] urls,
                             DOMString destName,
                             ZipSelectionCallback callback);
    static void validatePathNameLength(
        DOMString parentUrl,
        DOMString name,
        ValidatePathNameLengthCallback callback);
  };
};