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

Unified Diff: ash/wm/gestures/long_press_affordance_handler.cc

Issue 630003003: Change GestureConfiguration types to be consistent with each other and with the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix compile Created 6 years, 2 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 | « ash/frame/caption_buttons/frame_size_button_unittest.cc ('k') | chrome/browser/resources/gesture_config.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/gestures/long_press_affordance_handler.cc
diff --git a/ash/wm/gestures/long_press_affordance_handler.cc b/ash/wm/gestures/long_press_affordance_handler.cc
index 0d6a8157b0d03043f7bfba46c83448feec626c38..49d3bd867df1494084532ae678190551b41fcd5a 100644
--- a/ash/wm/gestures/long_press_affordance_handler.cc
+++ b/ash/wm/gestures/long_press_affordance_handler.cc
@@ -254,12 +254,12 @@ void LongPressAffordanceHandler::ProcessEvent(aura::Window* target,
tap_down_location_ = event->root_location();
SetTapDownTarget(target);
current_animation_type_ = GROW_ANIMATION;
- int64 timer_start_time_ms =
- ui::GestureConfiguration::semi_long_press_time_in_seconds() * 1000;
- timer_.Start(FROM_HERE,
- base::TimeDelta::FromMilliseconds(timer_start_time_ms),
- this,
- &LongPressAffordanceHandler::StartAnimation);
+ timer_.Start(
+ FROM_HERE,
+ base::TimeDelta::FromMilliseconds(
+ ui::GestureConfiguration::semi_long_press_time_in_ms()),
+ this,
+ &LongPressAffordanceHandler::StartAnimation);
break;
}
case ui::ET_GESTURE_TAP:
@@ -286,9 +286,8 @@ void LongPressAffordanceHandler::StartAnimation() {
return;
}
view_.reset(new LongPressAffordanceView(tap_down_location_, root_window));
- SetDuration(
- ui::GestureConfiguration::long_press_time_in_seconds() * 1000 -
- ui::GestureConfiguration::semi_long_press_time_in_seconds() * 1000 -
+ SetDuration(ui::GestureConfiguration::long_press_time_in_ms() -
+ ui::GestureConfiguration::semi_long_press_time_in_ms() -
kAffordanceDelayBeforeShrinkMs);
Start();
break;
« no previous file with comments | « ash/frame/caption_buttons/frame_size_button_unittest.cc ('k') | chrome/browser/resources/gesture_config.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698