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

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

Issue 10692090: Move FileCopyManager to background page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 (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 * FileManager constructor. 6 * FileManager constructor.
7 * 7 *
8 * FileManager objects encapsulate the functionality of the file selector 8 * FileManager objects encapsulate the functionality of the file selector
9 * dialogs, as well as the full screen file manager application (though the 9 * dialogs, as well as the full screen file manager application (though the
10 * latter is not yet implemented). 10 * latter is not yet implemented).
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 this.updateFileTypeFilter_(); 507 this.updateFileTypeFilter_();
508 508
509 // Show the page now unless it's already delayed. 509 // Show the page now unless it's already delayed.
510 this.delayShow_(0); 510 this.delayShow_(0);
511 511
512 metrics.recordInterval('Load.DOM'); 512 metrics.recordInterval('Load.DOM');
513 metrics.recordInterval('Load.Total'); 513 metrics.recordInterval('Load.Total');
514 }; 514 };
515 515
516 FileManager.prototype.initDataTransferOperations_ = function() { 516 FileManager.prototype.initDataTransferOperations_ = function() {
517 this.copyManager_ = new FileCopyManager(this.filesystem_.root); 517 this.copyManager_ = new FileCopyManagerWrapper.getInstance(
518 this.filesystem_.root);
518 this.copyManager_.addEventListener('copy-progress', 519 this.copyManager_.addEventListener('copy-progress',
519 this.onCopyProgress_.bind(this)); 520 this.onCopyProgress_.bind(this));
520 this.copyManager_.addEventListener('copy-operation-complete', 521 this.copyManager_.addEventListener('copy-operation-complete',
521 this.onCopyManagerOperationComplete_.bind(this)); 522 this.onCopyManagerOperationComplete_.bind(this));
522 523
523 var controller = this.fileTransferController_ = new FileTransferController( 524 var controller = this.fileTransferController_ = new FileTransferController(
524 GridItem.bind(null, this, false /* no checkbox */), 525 GridItem.bind(null, this, false /* no checkbox */),
525 this.copyManager_, 526 this.copyManager_,
526 this.directoryModel_); 527 this.directoryModel_);
527 controller.attachDragSource(this.table_.list); 528 controller.attachDragSource(this.table_.list);
(...skipping 3650 matching lines...) Expand 10 before | Expand all | Expand 10 after
4178 this.defaultActionMenuItem_.taskId = taskItem.taskId; 4179 this.defaultActionMenuItem_.taskId = taskItem.taskId;
4179 } 4180 }
4180 4181
4181 var defaultActionSeparator = 4182 var defaultActionSeparator =
4182 this.dialogDom_.querySelector('#default-action-separator'); 4183 this.dialogDom_.querySelector('#default-action-separator');
4183 4184
4184 this.defaultActionMenuItem_.hidden = !taskItem; 4185 this.defaultActionMenuItem_.hidden = !taskItem;
4185 defaultActionSeparator.hidden = !taskItem; 4186 defaultActionSeparator.hidden = !taskItem;
4186 } 4187 }
4187 })(); 4188 })();
4189
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698