Index: ui/views/focus/focus_manager.cc |
diff --git a/ui/views/focus/focus_manager.cc b/ui/views/focus/focus_manager.cc |
index 8dec8eaafb6097ed30e21e371689164b24dc7bb0..7de6513fc6e22d960903984244fa95f6d874115d 100644 |
--- a/ui/views/focus/focus_manager.cc |
+++ b/ui/views/focus/focus_manager.cc |
@@ -11,6 +11,7 @@ |
#include "base/logging.h" |
#include "build/build_config.h" |
#include "ui/base/accelerators/accelerator.h" |
+#include "ui/base/accelerators/accelerator_history.h" |
#include "ui/base/ime/input_method.h" |
#include "ui/base/ime/text_input_client.h" |
#include "ui/base/ime/text_input_focus_manager.h" |
@@ -59,20 +60,8 @@ bool FocusManager::OnKeyEvent(const ui::KeyEvent& event) { |
if (shortcut_handling_suspended()) |
return true; |
- int modifiers = ui::EF_NONE; |
- if (event.IsShiftDown()) |
- modifiers |= ui::EF_SHIFT_DOWN; |
- if (event.IsControlDown()) |
- modifiers |= ui::EF_CONTROL_DOWN; |
- if (event.IsAltDown()) |
- modifiers |= ui::EF_ALT_DOWN; |
-#if defined(OS_MACOSX) || defined(OS_CHROMEOS) |
- if (event.IsCommandDown()) |
- modifiers |= ui::EF_COMMAND_DOWN; |
-#endif |
- ui::Accelerator accelerator(event.key_code(), modifiers); |
- accelerator.set_type(event.type()); |
- accelerator.set_is_repeat(event.IsRepeat()); |
+ ui::Accelerator accelerator(ui::AcceleratorHistory::GetInstance()-> |
+ GetCurrentAccelerator()); |
Jun Mukai
2014/11/17 17:39:20
Can we revert this? Is there any specific reason
afakhry
2014/11/17 23:10:18
Done.
|
if (event.type() == ui::ET_KEY_PRESSED) { |
// If the focused view wants to process the key event as is, let it be. |