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

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

Issue 10916149: (NOT FOR FINAL REVIEW)Refactor butter_bar.js for wallpaper manager and file manager to use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 }; 465 };
466 466
467 FileManager.prototype.initDataTransferOperations_ = function() { 467 FileManager.prototype.initDataTransferOperations_ = function() {
468 this.copyManager_ = new FileCopyManagerWrapper.getInstance( 468 this.copyManager_ = new FileCopyManagerWrapper.getInstance(
469 this.filesystem_.root); 469 this.filesystem_.root);
470 this.copyManager_.addEventListener('copy-progress', 470 this.copyManager_.addEventListener('copy-progress',
471 this.onCopyProgress_.bind(this)); 471 this.onCopyProgress_.bind(this));
472 this.copyManager_.addEventListener('copy-operation-complete', 472 this.copyManager_.addEventListener('copy-operation-complete',
473 this.onCopyManagerOperationComplete_.bind(this)); 473 this.onCopyManagerOperationComplete_.bind(this));
474 474
475 this.butterBar_ = new ButterBar(this.dialogDom_, this.copyManager_); 475 this.butterBar_ = new FileManagerButterBar(this.dialogDom_,
476 this.copyManager_);
476 477
477 var controller = this.fileTransferController_ = new FileTransferController( 478 var controller = this.fileTransferController_ = new FileTransferController(
478 GridItem.bind(null, this, false /* no checkbox */), 479 GridItem.bind(null, this, false /* no checkbox */),
479 this.copyManager_, 480 this.copyManager_,
480 this.directoryModel_); 481 this.directoryModel_);
481 controller.attachDragSource(this.table_.list); 482 controller.attachDragSource(this.table_.list);
482 controller.attachDropTarget(this.table_.list); 483 controller.attachDropTarget(this.table_.list);
483 controller.attachDragSource(this.grid_); 484 controller.attachDragSource(this.grid_);
484 controller.attachDropTarget(this.grid_); 485 controller.attachDropTarget(this.grid_);
485 controller.attachDropTarget(this.rootsList_, true); 486 controller.attachDropTarget(this.rootsList_, true);
(...skipping 3745 matching lines...) Expand 10 before | Expand all | Expand 10 after
4231 this.dialogDom_.querySelector('#default-action-separator'); 4232 this.dialogDom_.querySelector('#default-action-separator');
4232 4233
4233 // TODO(dzvorygin): Here we use this hack, since 'hidden' is standard 4234 // TODO(dzvorygin): Here we use this hack, since 'hidden' is standard
4234 // attribute and we can't use it's setter as usual. 4235 // attribute and we can't use it's setter as usual.
4235 this.openWithCommand_.__lookupSetter__('hidden'). 4236 this.openWithCommand_.__lookupSetter__('hidden').
4236 call(this.openWithCommand_, !(defaultItem && isMultiple)); 4237 call(this.openWithCommand_, !(defaultItem && isMultiple));
4237 this.defaultActionMenuItem_.hidden = !defaultItem; 4238 this.defaultActionMenuItem_.hidden = !defaultItem;
4238 defaultActionSeparator.hidden = !defaultItem; 4239 defaultActionSeparator.hidden = !defaultItem;
4239 }; 4240 };
4240 })(); 4241 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698