views: menu: Remove MenuMessageLoop::ShouldQuitNow
commita75921971720a2c2bfbd65f7bcc44a3aad0d5914
authorspang <spang@chromium.org>
Tue, 6 Jan 2015 01:02:30 +0000 (5 17:02 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 6 Jan 2015 01:03:53 +0000 (6 01:03 +0000)
tree2e4be430920e503f2ba1d4c7424dc7191b439947
parent0cffcfcc81a27345965a05ad0654d7d5ccd9eea9
views: menu: Remove MenuMessageLoop::ShouldQuitNow

This check was added in r169118 to guard against terminating the wrong
message loop when a menu closes via MessageLoop::current()->QuitNow().

We are now using RunLoop::Quit() to terminate the menu message loop, so
this cannot happen. We can remove this check and allow menu message loops
to unwind as soon as they are able.

This change fixes some views menu DnD tests not terminating on CrOS
ozone, because ViewEventTestBase::Done() is not able to terminate both
the menu loop and its own loop robustly.

BUG=444428,446335
TEST=BookmarkBarViewTest{5,7,8} with chromeos=1 use_ozone=1 build

Review URL: https://codereview.chromium.org/835993002

Cr-Commit-Position: refs/heads/master@{#310020}
ui/views/controls/menu/menu_controller.cc
ui/views/controls/menu/menu_controller.h
ui/views/controls/menu/menu_message_loop.h
ui/views/controls/menu/menu_message_loop_aura.cc
ui/views/controls/menu/menu_message_loop_aura.h
ui/views/controls/menu/menu_message_loop_mac.cc
ui/views/controls/menu/menu_message_loop_mac.h