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

Unified Diff: ui/file_manager/video_player/js/video_player.js

Issue 1161393003: Media player: Add shortcut keys (Ctrl+Shift+I/J/C/B) to media players for debug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « ui/file_manager/audio_player/js/audio_player.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/video_player/js/video_player.js
diff --git a/ui/file_manager/video_player/js/video_player.js b/ui/file_manager/video_player/js/video_player.js
index e414340bb80974fe0eb5669256663b498d42776a..ab83c4abc92c7485b22861c20bd39e4d70e51183 100644
--- a/ui/file_manager/video_player/js/video_player.js
+++ b/ui/file_manager/video_player/js/video_player.js
@@ -27,7 +27,21 @@ function FullWindowVideoControls(
this.updateStyle();
window.addEventListener('resize', this.updateStyle.wrap(this));
document.addEventListener('keydown', function(e) {
- switch (e.keyIdentifier) {
+ switch (util.getKeyModifiers(e) + e.keyIdentifier) {
+ // Handle debug shortcut keys.
+ case 'Ctrl-Shift-U+0049': // Ctrl+Shift+I
+ chrome.fileManagerPrivate.openInspector('normal');
+ break;
+ case 'Ctrl-Shift-U+004A': // Ctrl+Shift+J
+ chrome.fileManagerPrivate.openInspector('console');
+ break;
+ case 'Ctrl-Shift-U+0043': // Ctrl+Shift+C
+ chrome.fileManagerPrivate.openInspector('element');
+ break;
+ case 'Ctrl-Shift-U+0042': // Ctrl+Shift+B
+ chrome.fileManagerPrivate.openInspector('background');
+ break;
+
case 'U+0020': // Space
case 'MediaPlayPause':
this.togglePlayStateWithFeedback();
« no previous file with comments | « ui/file_manager/audio_player/js/audio_player.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698