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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 /** | 561 /** |
562 * Displays open with dialog for current selection. | 562 * Displays open with dialog for current selection. |
563 * @type {Command} | 563 * @type {Command} |
564 */ | 564 */ |
565 CommandHandler.COMMANDS_['open-with'] = { | 565 CommandHandler.COMMANDS_['open-with'] = { |
566 execute: function(event, fileManager) { | 566 execute: function(event, fileManager) { |
567 var tasks = fileManager.getSelection().tasks; | 567 var tasks = fileManager.getSelection().tasks; |
568 if (tasks) { | 568 if (tasks) { |
569 tasks.showTaskPicker(fileManager.defaultTaskPicker, | 569 tasks.showTaskPicker(fileManager.defaultTaskPicker, |
570 str('OPEN_WITH_BUTTON_LABEL'), | 570 str('OPEN_WITH_BUTTON_LABEL'), |
571 null, | 571 '', |
572 function(task) { | 572 function(task) { |
573 tasks.execute(task.taskId); | 573 tasks.execute(task.taskId); |
574 }); | 574 }); |
575 } | 575 } |
576 }, | 576 }, |
577 canExecute: function(event, fileManager) { | 577 canExecute: function(event, fileManager) { |
578 var tasks = fileManager.getSelection().tasks; | 578 var tasks = fileManager.getSelection().tasks; |
579 event.canExecute = tasks && tasks.size() > 1; | 579 event.canExecute = tasks && tasks.size() > 1; |
580 } | 580 } |
581 }; | 581 }; |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 /** | 829 /** |
830 * Reset the zoom factor. | 830 * Reset the zoom factor. |
831 * @type {Command} | 831 * @type {Command} |
832 */ | 832 */ |
833 CommandHandler.COMMANDS_['zoom-reset'] = { | 833 CommandHandler.COMMANDS_['zoom-reset'] = { |
834 execute: function(event, fileManager) { | 834 execute: function(event, fileManager) { |
835 chrome.fileBrowserPrivate.zoom('reset'); | 835 chrome.fileBrowserPrivate.zoom('reset'); |
836 }, | 836 }, |
837 canExecute: CommandUtil.canExecuteAlways | 837 canExecute: CommandUtil.canExecuteAlways |
838 }; | 838 }; |
OLD | NEW |