Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Side by Side Diff: ui/file_manager/externs/background/import_history.js

Issue 2890123003: Compile file_manager and eliminate gyp v1 from Files App! (Closed)
Patch Set: Fix test failures. Format. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 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.
4
5 // Namespace
6 var importer;
7
8 /**
9 * A persistent data store for Cloud Import history information.
10 *
11 * @interface
12 */
13 importer.ImportHistory = function() {};
14
15 /**
16 * @return {!Promise<!importer.ImportHistory>} Resolves when history
17 * has been fully loaded.
18 */
19 importer.ImportHistory.prototype.whenReady;
20
21 /**
22 * @param {!FileEntry} entry
23 * @param {!importer.Destination} destination
24 * @return {!Promise<boolean>} Resolves with true if the FileEntry
25 * was previously copied to the device.
26 */
27 importer.ImportHistory.prototype.wasCopied;
28
29 /**
30 * @param {!FileEntry} entry
31 * @param {!importer.Destination} destination
32 * @return {!Promise<boolean>} Resolves with true if the FileEntry
33 * was previously imported to the specified destination.
34 */
35 importer.ImportHistory.prototype.wasImported;
36
37 /**
38 * @param {!FileEntry} entry
39 * @param {!importer.Destination} destination
40 * @param {string} destinationUrl
41 */
42 importer.ImportHistory.prototype.markCopied;
43
44 /**
45 * List urls of all files that are marked as copied, but not marked as synced.
46 * @param {!importer.Destination} destination
47 * @return {!Promise<!Array<string>>}
48 */
49 importer.ImportHistory.prototype.listUnimportedUrls;
50
51 /**
52 * @param {!FileEntry} entry
53 * @param {!importer.Destination} destination
54 * @return {!Promise<?>} Resolves when the operation is completed.
55 */
56 importer.ImportHistory.prototype.markImported;
57
58 /**
59 * @param {string} destinationUrl
60 * @return {!Promise<?>} Resolves when the operation is completed.
61 */
62 importer.ImportHistory.prototype.markImportedByUrl;
63
64 /**
65 * Adds an observer, which will be notified when cloud import history changes.
66 *
67 * @param {!importer.ImportHistory.Observer} observer
68 */
69 importer.ImportHistory.prototype.addObserver;
70
71 /**
72 * Remove a previously registered observer.
73 *
74 * @param {!importer.ImportHistory.Observer} observer
75 */
76 importer.ImportHistory.prototype.removeObserver;
77
78 /**
79 * @typedef {{
80 * state: !importer.ImportHistoryState,
81 * entry: !FileEntry
82 * }}
83 */
84 importer.ImportHistory.ChangedEvent;
85
86 /** @typedef {function(!importer.ImportHistory.ChangedEvent)} */
87 importer.ImportHistory.Observer;
88
89 /**
90 * Provider of lazy loaded importer.ImportHistory. This is the main
91 * access point for a fully prepared {@code importer.ImportHistory} object.
92 *
93 * @interface
94 */
95 importer.HistoryLoader = function() {};
96
97 /**
98 * Instantiates an {@code importer.ImportHistory} object and manages any
99 * necessary ongoing maintenance of the object with respect to
100 * its external dependencies.
101 *
102 * @see importer.SynchronizedHistoryLoader for an example.
103 *
104 * @return {!Promise<!importer.ImportHistory>} Resolves when history instance
105 * is ready.
106 */
107 importer.HistoryLoader.prototype.getHistory;
108
109 /**
110 * Adds a listener to be notified when history is fully loaded for the first
111 * time. If history is already loaded...will be called immediately.
112 *
113 * @param {function(!importer.ImportHistory)} listener
114 */
115 importer.HistoryLoader.prototype.addHistoryLoadedListener;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698