Chromium Code Reviews| 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 3f59112e743250fca4ffda6a3c1bd89243b30788..4e60f9aceca66fbcf948ad0bbce6458bd393d4f5 100644 |
| --- a/ui/views/controls/menu/menu_controller.cc |
| +++ b/ui/views/controls/menu/menu_controller.cc |
| @@ -1578,13 +1578,25 @@ void MenuController::StopShowTimer() { |
| void MenuController::StartCancelAllTimer() { |
| cancel_all_timer_.Start(FROM_HERE, |
| TimeDelta::FromMilliseconds(kCloseOnExitTime), |
| - this, &MenuController::CancelAll); |
| + this, &MenuController::CancelAllForDrag); |
| } |
| void MenuController::StopCancelAllTimer() { |
| cancel_all_timer_.Stop(); |
| } |
| +void MenuController::CancelAllForDrag() { |
| + // It's possible that a child View will be in the middle of a drag-and-drop |
| + // operation that we didn't get events for (since we only get updated for |
| + // MenuItemViews). If so, just restart the cancel timer. |
| + if (state_.item && |
| + state_.item->GetDelegate() && |
| + state_.item->GetDelegate()->InNestedDrag()) |
|
sky
2014/07/18 19:36:54
This isn't state that's going to change. So it sho
Devlin
2014/07/18 21:38:31
Sorry, not sure I follow. Passed in to where?
sky
2014/07/18 22:45:39
Into MenuRunner when you Run the menu. Basically I
Devlin
2014/07/21 20:00:56
Done.
|
| + StartCancelAllTimer(); |
| + else |
| + CancelAll(); |
| +} |
| + |
| gfx::Rect MenuController::CalculateMenuBounds(MenuItemView* item, |
| bool prefer_leading, |
| bool* is_leading) { |