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

Unified Diff: remoting/webapp/me2mom/remoting.js

Issue 7761009: Added hot-key for toggleDebugLog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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: remoting/webapp/me2mom/remoting.js
diff --git a/remoting/webapp/me2mom/remoting.js b/remoting/webapp/me2mom/remoting.js
index 823686373b7344e0b1121d55be8dab8f31c8689f..08de0c5f8b859abc0bdc5bbe92c9595eeb424125 100644
--- a/remoting/webapp/me2mom/remoting.js
+++ b/remoting/webapp/me2mom/remoting.js
@@ -196,6 +196,11 @@ remoting.setMode = function(mode) {
}
remoting.debug.log('App mode: ' + mode);
remoting.currentMode = mode;
+ if (mode == remoting.AppMode.IN_SESSION) {
+ document.removeEventListener('keydown', remoting.checkHotkeys, false);
+ } else {
+ document.addEventListener('keydown', remoting.checkHotkeys, false);
+ }
}
/**
@@ -648,7 +653,10 @@ remoting.promptClose = function() {
}
}
-}());
+remoting.checkHotkeys = function(event) {
+ if (String.fromCharCode(event.which) == 'D') {
+ remoting.toggleDebugLog();
+ }
+}
-// Shortcut to save typing now that this is the only way to show the debug log.
-var tdl = remoting.toggleDebugLog;
+}());
« 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