Chromium Code Reviews| Index: ui/views/controls/menu/menu_controller.cc |
| diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc |
| index 3408d2f263d050caa71023446eed683ca2020561..53929467b9238f51515045ee2302f0b157d87197 100644 |
| --- a/ui/views/controls/menu/menu_controller.cc |
| +++ b/ui/views/controls/menu/menu_controller.cc |
| @@ -25,6 +25,7 @@ |
| #include "ui/views/widget/widget.h" |
| #if defined(USE_AURA) |
| +#include "ash/accelerators/accelerator_handler.h" |
| #include "ui/aura/root_window.h" |
| #elif defined(TOOLKIT_USES_GTK) |
| #include "ui/base/keycodes/keyboard_code_conversion_gtk.h" |
| @@ -318,7 +319,11 @@ MenuItemView* MenuController::Run(Widget* parent, |
| MessageLoopForUI* loop = MessageLoopForUI::current(); |
| bool did_allow_task_nesting = loop->NestableTasksAllowed(); |
| loop->SetNestableTasksAllowed(true); |
| +#if defined(USE_AURA) |
| + loop->RunWithDispatcher(new ash::AcceleratorHandler(this)); |
|
oshima
2012/01/23 18:06:39
this leaks memory. You can do:
ash::AcceleratorHa
|
| +#else |
| loop->RunWithDispatcher(this); |
| +#endif |
| loop->SetNestableTasksAllowed(did_allow_task_nesting); |
| if (ViewsDelegate::views_delegate) |