Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: ui/views/controls/menu/menu_controller.cc

Issue 9224001: Fixes issue with accelerators when a menu is open (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes as requested Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 87199dc9fa6c3adc1872b3d2f9b540ea0fdfdc76..0f16a60bf3b6966331ba53a4e1751c8e6f8a4329 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 "ui/aura/client/dispatcher_client.h"
#include "ui/aura/root_window.h"
#elif defined(TOOLKIT_USES_GTK)
#include "ui/base/keycodes/keyboard_code_conversion_gtk.h"
@@ -318,11 +319,15 @@ MenuItemView* MenuController::Run(Widget* parent,
// one) the menus are run from a task. If we don't do this and are invoked
// from a task none of the tasks we schedule are processed and the menu
// appears totally broken.
+#if defined(USE_AURA)
+ aura::client::GetDispatcherClient()->RunWithDispatcher(this, true);
+#else
MessageLoopForUI* loop = MessageLoopForUI::current();
bool did_allow_task_nesting = loop->NestableTasksAllowed();
loop->SetNestableTasksAllowed(true);
loop->RunWithDispatcher(this);
loop->SetNestableTasksAllowed(did_allow_task_nesting);
+#endif
if (ViewsDelegate::views_delegate)
ViewsDelegate::views_delegate->ReleaseRef();
« ash/accelerators/nested_dispatcher_controller.h ('K') | « ui/aura/client/dispatcher_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698