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

Unified Diff: ui/views/controls/button/menu_button.cc

Issue 2299443002: Update MenuButton closing time for async (Closed)
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/menu_button.cc
diff --git a/ui/views/controls/button/menu_button.cc b/ui/views/controls/button/menu_button.cc
index 4b562c5e5fbe9832c8389ca17a9d4b7b18982a93..38fc310aa6246e9d9d260cf97c04b816ec265a9d 100644
--- a/ui/views/controls/button/menu_button.cc
+++ b/ui/views/controls/button/menu_button.cc
@@ -145,8 +145,6 @@ bool MenuButton::Activate(const ui::Event* event) {
increment_pressed_lock_called_ = nullptr;
destroyed_flag_ = nullptr;
- menu_closed_time_ = TimeTicks::Now();
-
if (!increment_pressed_lock_called && pressed_lock_count_ == 0) {
AnimateInkDrop(InkDropState::ACTION_TRIGGERED,
ui::LocatedEvent::FromIfValid(event));
@@ -387,6 +385,7 @@ void MenuButton::DecrementPressedLocked() {
// If this was the last lock, manually reset state to the desired state.
if (pressed_lock_count_ == 0) {
+ menu_closed_time_ = TimeTicks::Now();
ButtonState desired_state = STATE_NORMAL;
if (should_disable_after_press_) {
desired_state = STATE_DISABLED;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698