Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index d4ee67f0084151da38e71cacfca9580626a641cf..d0422d8185a16d2fc779309d74c415c1f8b021ea 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -3041,6 +3041,21 @@ void Browser::TabStripEmpty() { |
is_attempting_to_close_browser_ = true; |
} |
+bool Browser::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
+ bool* is_keyboard_shortcut) { |
+ // Escape exits tabbed fullscreen mode. |
+ // TODO(koz): Write a test for this http://crbug.com/100441. |
+ if (event.windowsKeyCode == 27 && |
+ fullscreen_controller_->HandleUserPressedEscape()) { |
+ return true; |
+ } |
+ return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut); |
+} |
+ |
+void Browser::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { |
+ window()->HandleKeyboardEvent(event); |
+} |
+ |
void Browser::OnAcceptFullscreenPermission( |
const GURL& url, |
FullscreenExitBubbleType bubble_type) { |
@@ -3458,21 +3473,6 @@ void Browser::ViewSourceForFrame(WebContents* source, |
ViewSource(tab_contents, frame_url, frame_content_state); |
} |
-bool Browser::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
- bool* is_keyboard_shortcut) { |
- // Escape exits tabbed fullscreen mode. |
- // TODO(koz): Write a test for this http://crbug.com/100441. |
- if (event.windowsKeyCode == 27 && |
- fullscreen_controller_->HandleUserPressedEscape()) { |
- return true; |
- } |
- return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut); |
-} |
- |
-void Browser::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { |
- window()->HandleKeyboardEvent(event); |
-} |
- |
void Browser::ShowRepostFormWarningDialog(WebContents* source) { |
browser::ShowTabModalConfirmDialog( |
new RepostFormWarningController(source), |