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

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

Issue 101243003: Remove getCurrentDirectoryURL and getCurrentDirPath from directory_model.js (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 (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 /** 7 /**
8 * TODO(dzvorygin): Here we use this hack, since 'hidden' is standard 8 * TODO(dzvorygin): Here we use this hack, since 'hidden' is standard
9 * attribute and we can't use it's setter as usual. 9 * attribute and we can't use it's setter as usual.
10 * @param {boolean} value New value of hidden property. 10 * @param {boolean} value New value of hidden property.
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 !directoryModel.isScanning(); 444 !directoryModel.isScanning();
445 } 445 }
446 }; 446 };
447 447
448 /** 448 /**
449 * Initiates new window creation. 449 * Initiates new window creation.
450 * @type {Command} 450 * @type {Command}
451 */ 451 */
452 CommandHandler.COMMANDS_['new-window'] = { 452 CommandHandler.COMMANDS_['new-window'] = {
453 execute: function(event, fileManager) { 453 execute: function(event, fileManager) {
454 // TODO(mtomasz): Use Entry.toURL() instead of fullPath.
454 fileManager.backgroundPage.launchFileManager({ 455 fileManager.backgroundPage.launchFileManager({
455 defaultPath: fileManager.getCurrentDirectory() 456 defaultPath: fileManager.getCurrentDirectoryEntry() &&
457 fileManager.getCurrentDirectoryEntry().fullPath
456 }); 458 });
457 }, 459 },
458 canExecute: function(event, fileManager) { 460 canExecute: function(event, fileManager) {
459 event.canExecute = 461 event.canExecute =
460 fileManager.getCurrentDirectoryEntry() && 462 fileManager.getCurrentDirectoryEntry() &&
461 (fileManager.dialogType === DialogType.FULL_PAGE); 463 (fileManager.dialogType === DialogType.FULL_PAGE);
462 } 464 }
463 }; 465 };
464 466
465 /** 467 /**
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 /** 829 /**
828 * Reset the zoom factor. 830 * Reset the zoom factor.
829 * @type {Command} 831 * @type {Command}
830 */ 832 */
831 CommandHandler.COMMANDS_['zoom-reset'] = { 833 CommandHandler.COMMANDS_['zoom-reset'] = {
832 execute: function(event, fileManager) { 834 execute: function(event, fileManager) {
833 chrome.fileBrowserPrivate.zoom('reset'); 835 chrome.fileBrowserPrivate.zoom('reset');
834 }, 836 },
835 canExecute: CommandUtil.canExecuteAlways 837 canExecute: CommandUtil.canExecuteAlways
836 }; 838 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698