| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 }; | 457 }; |
| 458 | 458 |
| 459 /** | 459 /** |
| 460 * Initiates new window creation. | 460 * Initiates new window creation. |
| 461 * @type {Command} | 461 * @type {Command} |
| 462 */ | 462 */ |
| 463 CommandHandler.COMMANDS_['new-window'] = { | 463 CommandHandler.COMMANDS_['new-window'] = { |
| 464 execute: function(event, fileManager) { | 464 execute: function(event, fileManager) { |
| 465 // TODO(mtomasz): Use Entry.toURL() instead of fullPath. | 465 // TODO(mtomasz): Use Entry.toURL() instead of fullPath. |
| 466 fileManager.backgroundPage.launchFileManager({ | 466 fileManager.backgroundPage.launchFileManager({ |
| 467 defaultPath: fileManager.getCurrentDirectoryEntry() && | 467 currentDirectoryPath: fileManager.getCurrentDirectoryEntry() && |
| 468 fileManager.getCurrentDirectoryEntry().fullPath | 468 fileManager.getCurrentDirectoryEntry().fullPath |
| 469 }); | 469 }); |
| 470 }, | 470 }, |
| 471 canExecute: function(event, fileManager) { | 471 canExecute: function(event, fileManager) { |
| 472 event.canExecute = | 472 event.canExecute = |
| 473 fileManager.getCurrentDirectoryEntry() && | 473 fileManager.getCurrentDirectoryEntry() && |
| 474 (fileManager.dialogType === DialogType.FULL_PAGE); | 474 (fileManager.dialogType === DialogType.FULL_PAGE); |
| 475 } | 475 } |
| 476 }; | 476 }; |
| 477 | 477 |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 /** | 839 /** |
| 840 * Reset the zoom factor. | 840 * Reset the zoom factor. |
| 841 * @type {Command} | 841 * @type {Command} |
| 842 */ | 842 */ |
| 843 CommandHandler.COMMANDS_['zoom-reset'] = { | 843 CommandHandler.COMMANDS_['zoom-reset'] = { |
| 844 execute: function(event, fileManager) { | 844 execute: function(event, fileManager) { |
| 845 chrome.fileBrowserPrivate.zoom('reset'); | 845 chrome.fileBrowserPrivate.zoom('reset'); |
| 846 }, | 846 }, |
| 847 canExecute: CommandUtil.canExecuteAlways | 847 canExecute: CommandUtil.canExecuteAlways |
| 848 }; | 848 }; |
| OLD | NEW |