| 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 * This variable is checked in SelectFileDialogExtensionBrowserTest. | 8 * This variable is checked in SelectFileDialogExtensionBrowserTest. |
| 9 * @type {number} | 9 * @type {number} |
| 10 */ | 10 */ |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 | 558 |
| 559 var commands = this.dialogDom_.querySelectorAll('command'); | 559 var commands = this.dialogDom_.querySelectorAll('command'); |
| 560 for (var i = 0; i < commands.length; i++) | 560 for (var i = 0; i < commands.length; i++) |
| 561 cr.ui.Command.decorate(commands[i]); | 561 cr.ui.Command.decorate(commands[i]); |
| 562 | 562 |
| 563 var doc = this.document_; | 563 var doc = this.document_; |
| 564 | 564 |
| 565 CommandUtil.registerCommand(this.dialogContainer_, 'newfolder', | 565 CommandUtil.registerCommand(this.dialogContainer_, 'newfolder', |
| 566 Commands.newFolderCommand, this, this.directoryModel_); | 566 Commands.newFolderCommand, this, this.directoryModel_); |
| 567 | 567 |
| 568 // Required to handle the command outside of the container, on the footer. |
| 569 // TODO(mtomasz): Remove after fixing crbug.com/275235. |
| 570 CommandUtil.registerCommand(this.dialogDom_.querySelector('.dialog-footer'), |
| 571 'newfolder', Commands.newFolderCommand, this, this.directoryModel_); |
| 572 |
| 568 CommandUtil.registerCommand(this.dialogContainer_, 'newwindow', | 573 CommandUtil.registerCommand(this.dialogContainer_, 'newwindow', |
| 569 Commands.newWindowCommand, this, this.directoryModel_); | 574 Commands.newWindowCommand, this, this.directoryModel_); |
| 570 | 575 |
| 571 CommandUtil.registerCommand(this.dialogContainer_, 'change-default-app', | 576 CommandUtil.registerCommand(this.dialogContainer_, 'change-default-app', |
| 572 Commands.changeDefaultAppCommand, this); | 577 Commands.changeDefaultAppCommand, this); |
| 573 | 578 |
| 574 CommandUtil.registerCommand(this.navigationList_, 'unmount', | 579 CommandUtil.registerCommand(this.navigationList_, 'unmount', |
| 575 Commands.unmountCommand, this); | 580 Commands.unmountCommand, this); |
| 576 | 581 |
| 577 CommandUtil.registerCommand(this.navigationList_, 'import-photos', | 582 CommandUtil.registerCommand(this.navigationList_, 'import-photos', |
| (...skipping 3320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3898 */ | 3903 */ |
| 3899 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { | 3904 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { |
| 3900 this.ctrlKeyPressed_ = flag; | 3905 this.ctrlKeyPressed_ = flag; |
| 3901 // Before the DOM is constructed, the key event can be handled. | 3906 // Before the DOM is constructed, the key event can be handled. |
| 3902 var cacheClearCommand = | 3907 var cacheClearCommand = |
| 3903 this.document_.querySelector('#drive-clear-local-cache'); | 3908 this.document_.querySelector('#drive-clear-local-cache'); |
| 3904 if (cacheClearCommand) | 3909 if (cacheClearCommand) |
| 3905 cacheClearCommand.canExecuteChange(); | 3910 cacheClearCommand.canExecuteChange(); |
| 3906 }; | 3911 }; |
| 3907 })(); | 3912 })(); |
| OLD | NEW |