summaryrefslogtreecommitdiffstats
path: root/views/focus
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-22 18:31:48 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-22 18:31:48 +0000
commitb1b4fa531d771bfc627836b8192aed17021614b2 (patch)
treebd631da65788ce8a209789c43f472f4a28289d83 /views/focus
parent23055d9c157a96eea2c95de19eb4d6505658dfba (diff)
downloadchromium_src-b1b4fa531d771bfc627836b8192aed17021614b2.zip
chromium_src-b1b4fa531d771bfc627836b8192aed17021614b2.tar.gz
chromium_src-b1b4fa531d771bfc627836b8192aed17021614b2.tar.bz2
Revert "Keyboard accessibility for the page and app menus.", rev 42234 and 42236.
TBR=dmazzoni Review URL: http://codereview.chromium.org/1158004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42239 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus')
-rw-r--r--views/focus/accelerator_handler_gtk.cc19
-rw-r--r--views/focus/focus_manager.h4
-rw-r--r--views/focus/focus_manager_gtk.cc6
-rw-r--r--views/focus/focus_manager_win.cc7
4 files changed, 1 insertions, 35 deletions
diff --git a/views/focus/accelerator_handler_gtk.cc b/views/focus/accelerator_handler_gtk.cc
index da7bd94..1ff5d81 100644
--- a/views/focus/accelerator_handler_gtk.cc
+++ b/views/focus/accelerator_handler_gtk.cc
@@ -4,9 +4,6 @@
#include <gtk/gtk.h>
-#include "base/keyboard_code_conversion_gtk.h"
-#include "base/keyboard_codes.h"
-#include "views/accelerator.h"
#include "views/focus/accelerator_handler.h"
#include "views/focus/focus_manager.h"
#include "views/widget/widget_gtk.h"
@@ -51,14 +48,6 @@ bool AcceleratorHandler::Dispatch(GdkEvent* event) {
if (event->type == GDK_KEY_PRESS) {
KeyEvent view_key_event(key_event);
-
- // If it's the Alt key, don't send it to the focus manager until release
- // (to handle focusing the menu bar).
- if (view_key_event.GetKeyCode() == base::VKEY_MENU) {
- last_key_pressed_ = key_event->keyval;
- return true;
- }
-
// FocusManager::OnKeyPressed and OnKeyReleased return false if this
// message has been consumed and should not be propagated further.
if (!focus_manager->OnKeyEvent(view_key_event)) {
@@ -71,14 +60,6 @@ bool AcceleratorHandler::Dispatch(GdkEvent* event) {
// as accelerators to avoid unpaired key release.
if (event->type == GDK_KEY_RELEASE &&
key_event->keyval == last_key_pressed_) {
- // Special case: the Alt key can trigger an accelerator on release
- // rather than on press.
- if (base::WindowsKeyCodeForGdkKeyCode(key_event->keyval) ==
- base::VKEY_MENU) {
- Accelerator accelerator(base::VKEY_MENU, false, false, false);
- focus_manager->ProcessAccelerator(accelerator);
- }
-
last_key_pressed_ = 0;
return true;
}
diff --git a/views/focus/focus_manager.h b/views/focus/focus_manager.h
index 2150560..bad9dba 100644
--- a/views/focus/focus_manager.h
+++ b/views/focus/focus_manager.h
@@ -278,10 +278,6 @@ class FocusManager {
static FocusManager* GetFocusManagerForNativeView(
gfx::NativeView native_view);
- // Retrieves the FocusManager associated with the passed native view.
- static FocusManager* GetFocusManagerForNativeWindow(
- gfx::NativeWindow native_window);
-
private:
// Returns the next focusable view.
View* GetNextFocusableView(View* starting_view, bool reverse, bool dont_loop);
diff --git a/views/focus/focus_manager_gtk.cc b/views/focus/focus_manager_gtk.cc
index a52a6d9..3038d93 100644
--- a/views/focus/focus_manager_gtk.cc
+++ b/views/focus/focus_manager_gtk.cc
@@ -49,10 +49,4 @@ FocusManager* FocusManager::GetFocusManagerForNativeView(
return focus_manager;
}
-// static
-FocusManager* FocusManager::GetFocusManagerForNativeWindow(
- gfx::NativeWindow native_window) {
- return GetFocusManagerForNativeView(GTK_WIDGET(native_window));
-}
-
} // namespace views
diff --git a/views/focus/focus_manager_win.cc b/views/focus/focus_manager_win.cc
index faf3815..fbccf7b 100644
--- a/views/focus/focus_manager_win.cc
+++ b/views/focus/focus_manager_win.cc
@@ -27,10 +27,5 @@ FocusManager* FocusManager::GetFocusManagerForNativeView(
return widget ? widget->GetFocusManager() : NULL;
}
-// static
-FocusManager* FocusManager::GetFocusManagerForNativeWindow(
- gfx::NativeWindow native_window) {
- return GetFocusManagerForNativeView(native_window);
-}
-
} // namespace views
+