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

Unified Diff: chrome/browser/resources/file_manager/js/media/video_player.js

Issue 12575004: Escape key should exit the fullscreen mode when playing a video. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/js/media/video_player.js
diff --git a/chrome/browser/resources/file_manager/js/media/video_player.js b/chrome/browser/resources/file_manager/js/media/video_player.js
index 3d7de037b2d7c1cd3d360bd5ca871a031d7140a6..31d9e212b5275c02be21f09c49b2adf268ed9e66 100644
--- a/chrome/browser/resources/file_manager/js/media/video_player.js
+++ b/chrome/browser/resources/file_manager/js/media/video_player.js
@@ -58,10 +58,17 @@ function FullWindowVideoControls(
window.addEventListener('resize', this.updateStyle.bind(this));
document.addEventListener('keydown', function(e) {
- if (e.keyIdentifier == 'U+0020') {
+ if (e.keyIdentifier == 'U+0020') { // Space
this.togglePlayStateWithFeedback();
e.preventDefault();
}
+ if (e.keyIdentifier == 'U+001B') { // Escape
+ chrome.fileBrowserPrivate.isFullscreen(function(enabled) {
+ if (enabled)
+ chrome.fileBrowserPrivate.toggleFullscreen();
+ });
+ e.preventDefault();
+ }
}.bind(this));
util.disableBrowserShortcutKeys(document);
« 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