Index: ui/aura/shared/compound_event_filter.cc |
=================================================================== |
--- ui/aura/shared/compound_event_filter.cc (revision 161397) |
+++ ui/aura/shared/compound_event_filter.cc (working copy) |
@@ -4,7 +4,6 @@ |
#include "ui/aura/shared/compound_event_filter.h" |
-#include "base/hash_tables.h" |
#include "ui/aura/client/activation_client.h" |
#include "ui/aura/client/cursor_client.h" |
#include "ui/aura/client/drag_drop_client.h" |
@@ -33,50 +32,6 @@ |
GetActiveWindow(); |
} |
-bool ShouldHideCursorOnKeyEvent(const ui::KeyEvent& event) { |
- // All alt and control key commands are ignored. |
- if (event.IsAltDown() || event.IsControlDown()) |
- return false; |
- |
- static bool inited = false; |
- static base::hash_set<int32> ignored_keys; |
- if (!inited) { |
- // Modifiers. |
- ignored_keys.insert(ui::VKEY_SHIFT); |
- ignored_keys.insert(ui::VKEY_CONTROL); |
- ignored_keys.insert(ui::VKEY_MENU); |
- |
- // Search key == VKEY_LWIN. |
- ignored_keys.insert(ui::VKEY_LWIN); |
- |
- // Function keys. |
- for (int key = ui::VKEY_F1; key <= ui::VKEY_F24; ++key) |
- ignored_keys.insert(key); |
- |
- // Media keys. |
- for (int key = ui::VKEY_BROWSER_BACK; key <= ui::VKEY_MEDIA_LAUNCH_APP2; |
- ++key) { |
- ignored_keys.insert(key); |
- } |
- ignored_keys.insert(ui::VKEY_WLAN); |
- ignored_keys.insert(ui::VKEY_BRIGHTNESS_DOWN); |
- ignored_keys.insert(ui::VKEY_BRIGHTNESS_UP); |
- ignored_keys.insert(ui::VKEY_KBD_BRIGHTNESS_DOWN); |
- ignored_keys.insert(ui::VKEY_KBD_BRIGHTNESS_UP); |
- |
-#if defined(OS_POSIX) |
- ignored_keys.insert(ui::VKEY_POWER); |
-#endif |
- |
- inited = true; |
- } |
- |
- if (ignored_keys.count(event.key_code()) > 0) |
- return false; |
- |
- return true; |
-} |
- |
} // namespace |
//////////////////////////////////////////////////////////////////////////////// |
@@ -209,11 +164,8 @@ |
// CompoundEventFilter, ui::EventHandler implementation: |
ui::EventResult CompoundEventFilter::OnKeyEvent(ui::KeyEvent* event) { |
- if (ShouldHideCursorOnKeyEvent(*event)) { |
- SetCursorVisibilityOnEvent( |
- static_cast<Window*>(event->target()), event, false); |
- } |
- |
+ SetCursorVisibilityOnEvent( |
+ static_cast<Window*>(event->target()), event, false); |
return FilterKeyEvent(event); |
} |