| 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 /** | 555 /** |
| 556 * Displays open with dialog for current selection. | 556 * Displays open with dialog for current selection. |
| 557 * @type {Command} | 557 * @type {Command} |
| 558 */ | 558 */ |
| 559 CommandHandler.COMMANDS_['open-with'] = { | 559 CommandHandler.COMMANDS_['open-with'] = { |
| 560 execute: function(event, fileManager) { | 560 execute: function(event, fileManager) { |
| 561 var tasks = fileManager.getSelection().tasks; | 561 var tasks = fileManager.getSelection().tasks; |
| 562 if (tasks) { | 562 if (tasks) { |
| 563 tasks.showTaskPicker(fileManager.defaultTaskPicker, | 563 tasks.showTaskPicker(fileManager.defaultTaskPicker, |
| 564 str('OPEN_WITH_BUTTON_LABEL'), | 564 str('OPEN_WITH_BUTTON_LABEL'), |
| 565 null, | 565 '', |
| 566 function(task) { | 566 function(task) { |
| 567 tasks.execute(task.taskId); | 567 tasks.execute(task.taskId); |
| 568 }); | 568 }); |
| 569 } | 569 } |
| 570 }, | 570 }, |
| 571 canExecute: function(event, fileManager) { | 571 canExecute: function(event, fileManager) { |
| 572 var tasks = fileManager.getSelection().tasks; | 572 var tasks = fileManager.getSelection().tasks; |
| 573 event.canExecute = tasks && tasks.size() > 1; | 573 event.canExecute = tasks && tasks.size() > 1; |
| 574 } | 574 } |
| 575 }; | 575 }; |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 /** | 819 /** |
| 820 * Reset the zoom factor. | 820 * Reset the zoom factor. |
| 821 * @type {Command} | 821 * @type {Command} |
| 822 */ | 822 */ |
| 823 CommandHandler.COMMANDS_['zoom-reset'] = { | 823 CommandHandler.COMMANDS_['zoom-reset'] = { |
| 824 execute: function(event, fileManager) { | 824 execute: function(event, fileManager) { |
| 825 chrome.fileBrowserPrivate.zoom('reset'); | 825 chrome.fileBrowserPrivate.zoom('reset'); |
| 826 }, | 826 }, |
| 827 canExecute: CommandUtil.canExecuteAlways | 827 canExecute: CommandUtil.canExecuteAlways |
| 828 }; | 828 }; |
| OLD | NEW |