views: menu: Enforce nested dispatcher destruction ordering
Nested dispatchers must be destroyed in the opposite order they are
installed. We shouldn't restore the dispatcher in QuitNow() if the nested
loop is still running, since another dispatcher might be stacked on top
of it (e.g. drag & drop).
This fixes a regression since r310020 ("views: menu: Remove
MenuMessageLoop::ShouldQuitNow"). Before that change, we explicitly
checked for drag & drop operations, and delayed message loop termination
if one was in progress. Since it now terminates regardless of DnD state,
the dispatcher gets destroyed earlier and (incorrectly) before the DnD
dispatcher is destroyed. Fix this by delaying dispatcher destruction
until our MenuMessageLoop actually returns.
BUG=447098
TEST=interactive_ui_tests
Review URL: https://codereview.chromium.org/
809313010
Cr-Commit-Position: refs/heads/master@{#310651}