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); |
} |