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

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

Issue 10154013: Fixes crash in closing menus. There are two issues here: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OnOwnerClosing and more comments 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_host.h ('k') | ui/views/widget/native_widget_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_host.cc
diff --git a/ui/views/controls/menu/menu_host.cc b/ui/views/controls/menu/menu_host.cc
index 23060d7b14506d1ae5000c79a5179543e9f7cc8c..44d2f62543d5557d7c9a79634de62f9eb8039b67 100644
--- a/ui/views/controls/menu/menu_host.cc
+++ b/ui/views/controls/menu/menu_host.cc
@@ -108,4 +108,11 @@ void MenuHost::OnNativeWidgetDestroyed() {
Widget::OnNativeWidgetDestroyed();
}
+void MenuHost::OnOwnerClosing() {
oshima 2012/04/26 15:03:07 can you add comment that this is invoked only on w
+ MenuController* menu_controller =
oshima 2012/04/26 15:03:07 can you add comment that this is used only on Wind
+ submenu_->GetMenuItem()->GetMenuController();
+ if (menu_controller && !menu_controller->drag_in_progress())
+ menu_controller->CancelAll();
+}
+
} // namespace views
« no previous file with comments | « ui/views/controls/menu/menu_host.h ('k') | ui/views/widget/native_widget_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698