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

Unified Diff: ui/file_manager/externs/background/media_import_handler.js

Issue 2883263002: Stop foreground depending on background in gyp v2 (Closed)
Patch Set: Remove private 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 side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/externs/background/media_import_handler.js
diff --git a/ui/file_manager/externs/background/media_import_handler.js b/ui/file_manager/externs/background/media_import_handler.js
new file mode 100644
index 0000000000000000000000000000000000000000..68c88605cc93f4bb24c71824d087b84228abd816
--- /dev/null
+++ b/ui/file_manager/externs/background/media_import_handler.js
@@ -0,0 +1,92 @@
+// Copyright 2017 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.
+
+// Namespace
+var importer;
+
+/**
+ * Interface providing access to information about active import processes.
+ *
+ * @interface
+ */
+importer.ImportRunner = function() {};
+
+/**
+ * Imports all media identified by scanResult.
+ *
+ * @param {!importer.ScanResult} scanResult
+ * @param {!importer.Destination} destination
+ * @param {!Promise<!DirectoryEntry>} directoryPromise
+ *
+ * @return {!importer.MediaImportHandler.ImportTask} The resulting import task.
+ */
+importer.ImportRunner.prototype.importFromScanResult;
+
+
+/**
+ * Handler for importing media from removable devices into the user's Drive.
+ *
+ * @constructor
+ * @implements {importer.ImportRunner}
+ * @struct
+ */
+importer.MediaImportHandler = function() {};
+
+/** @override */
+importer.MediaImportHandler.prototype.importFromScanResult = function(
+ scanResult, destination, directoryPromise) {};
+
+/**
+ * Note that this isn't an actual FileOperationManager.Task. It currently uses
+ * the FileOperationManager (and thus *spawns* an associated
+ * FileOperationManager.CopyTask) but this is a temporary state of affairs.
+ *
+ * @constructor
+ * @extends {importer.TaskQueue.BaseTask}
+ * @struct
+ *
+ */
+importer.MediaImportHandler.ImportTask = function() {};
+
+
+/** @struct */
+importer.MediaImportHandler.ImportTask.prototype = {
+ /** @return {number} Number of imported bytes */
+ get processedBytes() {},
+
+ /** @return {number} Total number of bytes to import */
+ get totalBytes() {},
+
+ /** @return {number} Number of files left to import */
+ get remainingFilesCount() {}
+};
+
+/**
+ * Update types that are specific to ImportTask. Clients can add Observers to
+ * ImportTask to listen for these kinds of updates.
+ * @enum {string}
+ */
+importer.MediaImportHandler.ImportTask.UpdateType = {};
+
+/**
+ * Auxilliary info for ENTRY_CHANGED notifications.
+ * @typedef {{
+ * sourceUrl: string,
+ * destination: !Entry
+ * }}
+ */
+importer.MediaImportHandler.ImportTask.EntryChangedInfo;
+
+/**
+ * Extends importer.TaskQueue.Task
+ */
+importer.MediaImportHandler.ImportTask.prototype.__proto__ =
+ importer.TaskQueue.BaseTask.prototype;
+
+
+/**
+ * Request cancellation of this task. An update will be sent to observers once
+ * the task is actually cancelled.
+ */
+importer.MediaImportHandler.ImportTask.prototype.requestCancel = function() {};

Powered by Google App Engine
This is Rietveld 408576698