| 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 '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 Loading... |
| 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 Loading... |
| 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 }; |
| OLD | NEW |