Index: trunk/src/ui/views/controls/menu/menu_controller.cc |
=================================================================== |
--- trunk/src/ui/views/controls/menu/menu_controller.cc (revision 192531) |
+++ trunk/src/ui/views/controls/menu/menu_controller.cc (working copy) |
@@ -53,11 +53,6 @@ |
// that the finger does not obscure the menu. |
static const int kCenteredContextMenuYOffset = -15; |
-// When showing context menu on mouse down, the user might accidentally select |
-// the menu item on the subsequent mouse up. To prevent this, we add the |
-// following delay before the user is able to select an item. |
-static const int kContextMenuSelectionHoldTimeMs = 200; |
- |
namespace views { |
namespace { |
@@ -291,14 +286,7 @@ |
possible_drag_ = false; |
drag_in_progress_ = false; |
closing_event_time_ = base::TimeDelta(); |
- menu_start_time_ = base::TimeTicks::Now(); |
- // If we are shown on mouse press, we will eat the subsequent mouse down and |
- // the parent widget will not be able to reset its state (it might have mouse |
- // capture from the mouse down). So we clear its state here. |
- if (parent && parent->GetRootView()) |
- parent->GetRootView()->SetMouseHandler(NULL); |
- |
bool nested_menu = showing_; |
if (showing_) { |
// Only support nesting of blocking_run menus, nesting of |
@@ -508,11 +496,7 @@ |
} |
if (!part.menu->NonIconChildViewsCount() && |
part.menu->GetDelegate()->IsTriggerableEvent(part.menu, event)) { |
- int64 time_since_menu_start = |
- (base::TimeTicks::Now() - menu_start_time_).InMilliseconds(); |
- if (!state_.context_menu || !View::ShouldShowContextMenuOnMousePress() || |
- time_since_menu_start > kContextMenuSelectionHoldTimeMs) |
- Accept(part.menu, event.flags()); |
+ Accept(part.menu, event.flags()); |
return; |
} |
} else if (part.type == MenuPart::MENU_ITEM) { |
@@ -1109,8 +1093,7 @@ |
delegate_(delegate), |
message_loop_depth_(0), |
menu_config_(theme), |
- closing_event_time_(base::TimeDelta()), |
- menu_start_time_(base::TimeTicks()) { |
+ closing_event_time_(base::TimeDelta()) { |
active_instance_ = this; |
} |