summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-26 20:52:14 +0000
committerrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-26 20:52:14 +0000
commit0e6fe1d195b5a320676db56c74f1e46a102bd8e3 (patch)
tree664f7e9255ff9a52eb2338bd31514a7c169315b1 /apps
parent83dd11e38d14d0650f4f1ee5ebe5689f478141e5 (diff)
downloadchromium_src-0e6fe1d195b5a320676db56c74f1e46a102bd8e3.zip
chromium_src-0e6fe1d195b5a320676db56c74f1e46a102bd8e3.tar.gz
chromium_src-0e6fe1d195b5a320676db56c74f1e46a102bd8e3.tar.bz2
Revert of https://codereview.chromium.org/62763003/
Reason for revert: This CL broke interactive tests on mac: http://build.chromium.org/p/chromium.mac/buildstatus?builder=Mac10.6%20Tests%20%281%29&number=46945 TBR=koz@chromium.org,mlamouri@chromium.org NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/89183002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237404 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r--apps/shell_window.cc30
-rw-r--r--apps/shell_window.h4
2 files changed, 0 insertions, 34 deletions
diff --git a/apps/shell_window.cc b/apps/shell_window.cc
index 7d1f1a9..aade475 100644
--- a/apps/shell_window.cc
+++ b/apps/shell_window.cc
@@ -289,39 +289,9 @@ void ShellWindow::AddNewContents(WebContents* source,
initial_pos, user_gesture, was_blocked);
}
-bool ShellWindow::PreHandleKeyboardEvent(
- content::WebContents* source,
- const content::NativeWebKeyboardEvent& event,
- bool* is_keyboard_shortcut) {
- // Here, we can handle a key event before the content gets it. When we are
- // fullscreen, we want to allow the user to leave when ESC is pressed.
- // However, if the application has the "overrideEscFullscreen" permission, we
- // should let it override that behavior.
- // ::HandleKeyboardEvent() will only be called if the KeyEvent's default
- // action is not prevented.
- // Thus, we should handle the KeyEvent here only if the permission is not set.
- if (event.windowsKeyCode == ui::VKEY_ESCAPE &&
- (fullscreen_types_ != FULLSCREEN_TYPE_NONE) &&
- !extension_->HasAPIPermission(APIPermission::kOverrideEscFullscreen)) {
- Restore();
- return true;
- }
-
- return false;
-}
-
void ShellWindow::HandleKeyboardEvent(
WebContents* source,
const content::NativeWebKeyboardEvent& event) {
- // If the window is currently fullscreen, ESC should leave fullscreen.
- // If this code is being called for ESC, that means that the KeyEvent's
- // default behavior was not prevented by the content.
- if (event.windowsKeyCode == ui::VKEY_ESCAPE &&
- (fullscreen_types_ != FULLSCREEN_TYPE_NONE)) {
- Restore();
- return;
- }
-
native_app_window_->HandleKeyboardEvent(event);
}
diff --git a/apps/shell_window.h b/apps/shell_window.h
index 9d21c4e..d8d3964 100644
--- a/apps/shell_window.h
+++ b/apps/shell_window.h
@@ -375,10 +375,6 @@ class ShellWindow : public content::NotificationObserver,
const gfx::Rect& initial_pos,
bool user_gesture,
bool* was_blocked) OVERRIDE;
- virtual bool PreHandleKeyboardEvent(
- content::WebContents* source,
- const content::NativeWebKeyboardEvent& event,
- bool* is_keyboard_shortcut) OVERRIDE;
virtual void HandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) OVERRIDE;