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

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

Issue 399143004: Open the WrenchMenu on mouseover when dragging a browser action (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Win/Test Fix Created 6 years, 5 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') | ui/views/controls/menu/menu_runner.h » ('j') | 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 3f59112e743250fca4ffda6a3c1bd89243b30788..a5691741d6bcf0feb7f7db94efed47b5c6d94a1e 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -290,6 +290,7 @@ MenuItemView* MenuController::Run(Widget* parent,
const gfx::Rect& bounds,
MenuAnchorPosition position,
bool context_menu,
+ bool is_nested_drag,
int* result_event_flags) {
exit_type_ = EXIT_NONE;
possible_drag_ = false;
@@ -348,9 +349,11 @@ MenuItemView* MenuController::Run(Widget* parent,
SetSelection(root, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
if (!blocking_run_) {
- // Start the timer to hide the menu. This is needed as we get no
- // notification when the drag has finished.
- StartCancelAllTimer();
+ if (!is_nested_drag) {
+ // Start the timer to hide the menu. This is needed as we get no
+ // notification when the drag has finished.
+ StartCancelAllTimer();
+ }
return NULL;
}
@@ -815,6 +818,10 @@ void MenuController::OnWidgetDestroying(Widget* widget) {
message_loop_->ClearOwner();
}
+bool MenuController::IsCancelAllTimerRunningForTest() {
+ return cancel_all_timer_.IsRunning();
+}
+
// static
void MenuController::TurnOffMenuSelectionHoldForTest() {
menu_selection_hold_time_ms = -1;
« no previous file with comments | « ui/views/controls/menu/menu_controller.h ('k') | ui/views/controls/menu/menu_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698