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

Unified Diff: apps/shell_window.cc

Issue 62763003: Leave fullscreen mode in an app window when ESC key is pressed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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
Index: apps/shell_window.cc
diff --git a/apps/shell_window.cc b/apps/shell_window.cc
index 5e4098f504d51f62a3971a450f99b155572babed..cc228873a2d35acf195f26ac4347121b13edd176 100644
--- a/apps/shell_window.cc
+++ b/apps/shell_window.cc
@@ -286,6 +286,13 @@ void ShellWindow::AddNewContents(WebContents* source,
void ShellWindow::HandleKeyboardEvent(
WebContents* source,
const content::NativeWebKeyboardEvent& event) {
+ // If the window is currently fullscreen, ESC should leave fullscreen.
+ if (event.windowsKeyCode == ui::VKEY_ESCAPE &&
+ (fullscreen_for_tab_ || fullscreen_for_window_api_)) {
+ Restore();
+ return;
+ }
+
native_app_window_->HandleKeyboardEvent(event);
}
« no previous file with comments | « no previous file | chrome/browser/apps/app_interactive_uitest.cc » ('j') | chrome/browser/apps/app_interactive_uitest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698