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

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

Issue 10143001: Work in progress: Adds MessagePumpDispatcher::ShouldExit(). This is used to handle the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« no previous file with comments | « ui/views/controls/menu/menu_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4dd0f06e297b3e7eb6249144d015ffdf2d4e2b74..bee9b8463e86028f01634f464e613245ada8ea86 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -935,6 +935,10 @@ bool MenuController::Dispatch(const base::NativeEvent& event) {
}
#endif
+bool MenuController::ShouldExit() OVERRIDE {
+ return exit_type_ != EXIT_NONE;
+}
+
bool MenuController::OnKeyDown(ui::KeyboardCode key_code) {
DCHECK(blocking_run_);
@@ -1972,16 +1976,6 @@ void MenuController::SendMouseCaptureLostToActiveView() {
void MenuController::SetExitType(ExitType type) {
exit_type_ = type;
-#if defined(USE_AURA)
- // On aura, closing menu may not trigger next native event, which
- // is necessary to exit from nested loop (See Dispatch methods).
- // Send non-op event so that Dispatch method will always be called.
- // crbug.com/104684.
- if (exit_type_ == EXIT_ALL || exit_type_ == EXIT_DESTROYED) {
- owner_->GetNativeView()->GetRootWindow()->PostNativeEvent(
- ui::CreateNoopEvent());
- }
-#endif
}
void MenuController::HandleMouseLocation(SubmenuView* source,
« no previous file with comments | « ui/views/controls/menu/menu_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698