// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-'use strict';
-
/**
* Event of the ProgressCenter class.
* @enum {string}
* @const
*/
-var ProgressCenterEvent = Object.freeze({
+var ProgressCenterEvent = {
/**
* Background page notifies item update to application windows.
*/
* Background page notifies all the items are cleared.
*/
RESET: 'reset'
-});
+};
+Object.freeze(ProgressCenterEvent);
/**
* State of progress items.
* @enum {string}
* @const
*/
-var ProgressItemState = Object.freeze({
+var ProgressItemState = {
PROGRESSING: 'progressing',
COMPLETED: 'completed',
ERROR: 'error',
CANCELED: 'canceled'
-});
+};
+Object.freeze(ProgressItemState);
/**
* Type of progress items.
* @enum {string}
* @const
*/
-var ProgressItemType = Object.freeze({
+var ProgressItemType = {
// The item is file copy operation.
COPY: 'copy',
// The item is file move operation.
// The item is general file transfer operation.
// This is used for the mixed operation of summarized item.
TRANSFER: 'transfer'
-});
+};
+Object.freeze(ProgressItemType);
/**
* Item of the progress center.
var ProgressCenterItem = function() {
/**
* Item ID.
- * @type {string}
+ * @type {?string}
* @private
*/
this.id_ = null;
/**
* Type of progress item.
- * @type {ProgressItemType}
+ * @type {?ProgressItemType}
*/
this.type = null;
/**
* Callback function to cancel the item.
- * @type {function()}
+ * @type {?function()}
*/
this.cancelCallback = null;
/**
* Getter of Item ID.
- * @return {string} Item ID.
+ * @return {?string} Item ID.
*/
get id() {
return this.id_;