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

Side by Side Diff: chrome/browser/resources/file_manager/common/js/progress_center_common.js

Issue 127763002: Files.app: Make ProgressCenterItemGroup class to manage the states of items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove an unused member. Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * Event of the ProgressCenter class. 8 * Event of the ProgressCenter class.
9 * @enum {string} 9 * @enum {string}
10 * @const 10 * @const
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 /** 148 /**
149 * Whether the item can be canceled or not. 149 * Whether the item can be canceled or not.
150 * @return {boolean} True if the item can be canceled. 150 * @return {boolean} True if the item can be canceled.
151 */ 151 */
152 get cancelable() { 152 get cancelable() {
153 return !!(this.state == ProgressItemState.PROGRESSING && 153 return !!(this.state == ProgressItemState.PROGRESSING &&
154 this.cancelCallback && 154 this.cancelCallback &&
155 !this.summarized); 155 !this.summarized);
156 } 156 }
157 }; 157 };
158
159 /**
160 * Clones the item.
161 * @return {ProgressCenterItem} New item having the same properties with this.
162 */
163 ProgressCenterItem.prototype.clone = function() {
164 var newItem = new ProgressCenterItem();
165 newItem.id = this.id;
166 newItem.state = this.state;
167 newItem.message = this.message;
168 newItem.progressMax = this.progressMax;
169 newItem.progressValue = this.progressValue;
170 newItem.type = this.type;
171 newItem.summarized = this.summarized;
172 newItem.cancelCallback = this.cancelCallback;
173 return newItem;
174 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698