Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2751)

Unified Diff: chrome/browser/resources/file_manager/foreground/js/file_manager_commands.js

Issue 153833005: Files.app: Remove unused ctrl key flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/foreground/js/file_manager_commands.js
diff --git a/chrome/browser/resources/file_manager/foreground/js/file_manager_commands.js b/chrome/browser/resources/file_manager/foreground/js/file_manager_commands.js
index 9e30791256ace3fee7f50ca279d1fccce998121f..da7a367a89f2376a4b80e90cf01043c65964c36f 100644
--- a/chrome/browser/resources/file_manager/foreground/js/file_manager_commands.js
+++ b/chrome/browser/resources/file_manager/foreground/js/file_manager_commands.js
@@ -239,13 +239,6 @@ var CommandHandler = function(fileManager) {
*/
this.commands_ = {};
- /**
- * Whether the ctrl key is pressed or not.
- * @type {boolean}
- * @private
- */
- this.ctrlKeyPressed_ = false;
-
Object.seal(this);
// Decorate command tags in the document.
@@ -259,8 +252,6 @@ var CommandHandler = function(fileManager) {
fileManager.document.addEventListener('command', this.onCommand_.bind(this));
fileManager.document.addEventListener('canExecute',
this.onCanExecute_.bind(this));
- fileManager.document.addEventListener('keydown', this.onKeyDown_.bind(this));
- fileManager.document.addEventListener('keyup', this.onKeyUp_.bind(this));
};
/**
@@ -312,34 +303,6 @@ CommandHandler.prototype.onCanExecute_ = function(event) {
};
/**
- * Handle key down event.
- * @param {Event} event Key down event.
- * @private
- */
-CommandHandler.prototype.onKeyDown_ = function(event) {
- // 17 is the keycode of Ctrl key and it means the event is not for other keys
- // with Ctrl modifier but for ctrl key itself.
- if (util.getKeyModifiers(event) + event.keyCode == 'Ctrl-17') {
- this.ctrlKeyPressed_ = true;
- this.updateAvailability();
- }
-};
-
-/**
- * Handle key up event.
- * @param {Event} event Key up event.
- * @private
- */
-CommandHandler.prototype.onKeyUp_ = function(event) {
- // 17 is the keycode of Ctrl key and it means the event is not for other keys
- // with Ctrl modifier but for ctrl key itself.
- if (util.getKeyModifiers(event) + event.keyCode == '17') {
- this.ctrlKeyPressed_ = false;
- this.updateAvailability();
- }
-};
-
-/**
* Commands.
* @type {Object.<string, Command>}
* @const
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698