| 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())
|
| + StartCancelAllTimer();
|
| + else
|
| + CancelAll();
|
| +}
|
| +
|
| gfx::Rect MenuController::CalculateMenuBounds(MenuItemView* item,
|
| bool prefer_leading,
|
| bool* is_leading) {
|
|
|