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

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

Issue 772963002: Make the second click on the app shelf icon close the window-list bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address the code review comments. Created 6 years 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 | « ash/shelf/shelf_view.cc ('k') | no next file » | 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 82992004885347d68a8464bc06bdca5af5528c1d..5ecf6917260f09baabd3e35d91fef24ce4c09f93 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -910,13 +910,10 @@ void MenuController::SetSelectionOnPointerDown(SubmenuView* source,
if (part.type == MenuPart::NONE ||
(part.type == MenuPart::MENU_ITEM && part.menu &&
part.menu->GetRootMenuItem() != state_.item->GetRootMenuItem())) {
- // Remember the time when we repost the event. The owner can then use this
- // to figure out if this menu was finished with the same click which is
- // sent to it thereafter. Note that the time stamp front he event cannot be
- // used since the reposting will set a new timestamp when the event gets
- // processed. As such it is better to take the current time which will be
- // closer to the time when it arrives again in the menu handler.
- closing_event_time_ = ui::EventTimeForNow();
+ // Remember the time stamp of the current (press down) event. The owner can
+ // then use this to figure out if this menu was finished with the same click
+ // which is sent to it thereafter.
+ closing_event_time_ = event.time_stamp();
// Mouse wasn't pressed over any menu, or the active menu, cancel.
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698