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

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

Issue 21244002: Remove sourceOnDrive and targetOnDrive from FileCopyManager.Task. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 'use strict'; 5 'use strict';
6 6
7 var CommandUtil = {}; 7 var CommandUtil = {};
8 8
9 /** 9 /**
10 * Extracts root on which command event was dispatched. 10 * Extracts root on which command event was dispatched.
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 } 509 }
510 }; 510 };
511 511
512 /** 512 /**
513 * Creates zip file for current selection. 513 * Creates zip file for current selection.
514 */ 514 */
515 Commands.zipSelectionCommand = { 515 Commands.zipSelectionCommand = {
516 execute: function(event, fileManager, directoryModel) { 516 execute: function(event, fileManager, directoryModel) {
517 var dirEntry = directoryModel.getCurrentDirEntry(); 517 var dirEntry = directoryModel.getCurrentDirEntry();
518 var selectionEntries = fileManager.getSelection().entries; 518 var selectionEntries = fileManager.getSelection().entries;
519 fileManager.copyManager_.zipSelection(dirEntry, fileManager.isOnDrive(), 519 fileManager.copyManager_.zipSelection(dirEntry, selectionEntries);
520 selectionEntries);
521 }, 520 },
522 canExecute: function(event, fileManager) { 521 canExecute: function(event, fileManager) {
523 var selection = fileManager.getSelection(); 522 var selection = fileManager.getSelection();
524 event.canExecute = !fileManager.isOnReadonlyDirectory() && 523 event.canExecute = !fileManager.isOnReadonlyDirectory() &&
525 !fileManager.isOnDrive() && 524 !fileManager.isOnDrive() &&
526 selection && selection.totalCount > 0; 525 selection && selection.totalCount > 0;
527 } 526 }
528 }; 527 };
529 528
530 /** 529 /**
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 631
633 /** 632 /**
634 * Reset the zoom factor. 633 * Reset the zoom factor.
635 */ 634 */
636 Commands.zoomResetCommand = { 635 Commands.zoomResetCommand = {
637 execute: function(event) { 636 execute: function(event) {
638 chrome.fileBrowserPrivate.zoom('reset'); 637 chrome.fileBrowserPrivate.zoom('reset');
639 }, 638 },
640 canExecute: CommandUtil.canExecuteAlways 639 canExecute: CommandUtil.canExecuteAlways
641 }; 640 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698