OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 5 |
6 /** | 6 /** |
7 * ImportingDialog manages the import process (which is really a copying). | 7 * ImportingDialog manages the import process (which is really a copying). |
| 8 * @constructor |
8 * @param {HTMLElement} parentNode Node to be parent for this dialog. | 9 * @param {HTMLElement} parentNode Node to be parent for this dialog. |
9 * @param {FileCopyManager} copyManager Copy manager isntance. | 10 * @param {FileCopyManager} copyManager Copy manager isntance. |
10 * @param {MetadataCache} metadataCache Metadata cache. | 11 * @param {MetadataCache} metadataCache Metadata cache. |
11 */ | 12 */ |
12 function ImportingDialog(parentNode, copyManager, metadataCache) { | 13 function ImportingDialog(parentNode, copyManager, metadataCache) { |
13 cr.ui.dialogs.BaseDialog.call(this, parentNode); | 14 cr.ui.dialogs.BaseDialog.call(this, parentNode); |
14 this.copyManager_ = copyManager; | 15 this.copyManager_ = copyManager; |
15 this.metadataCache_ = metadataCache; | 16 this.metadataCache_ = metadataCache; |
16 this.onCopyProgressBound_ = this.onCopyProgress_.bind(this); | 17 this.onCopyProgressBound_ = this.onCopyProgress_.bind(this); |
17 } | 18 } |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 loadTimeData.getString('PHOTO_IMPORT_IMPORTING_ERROR'); | 172 loadTimeData.getString('PHOTO_IMPORT_IMPORTING_ERROR'); |
172 this.imageBox_.setAttribute('state', 'error'); | 173 this.imageBox_.setAttribute('state', 'error'); |
173 this.frame_.removeChild(this.cancelButton_); | 174 this.frame_.removeChild(this.cancelButton_); |
174 this.frame_.appendChild(this.okButton_); | 175 this.frame_.appendChild(this.okButton_); |
175 break; | 176 break; |
176 | 177 |
177 default: | 178 default: |
178 console.error('Unknown "copy-progress" event reason: ' + event.reason); | 179 console.error('Unknown "copy-progress" event reason: ' + event.reason); |
179 } | 180 } |
180 }; | 181 }; |
OLD | NEW |