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

Unified Diff: ash/wm/system_gesture_event_filter.cc

Issue 10532212: Gesture Recognizer: Make short long press time configurable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years, 6 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 | 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/system_gesture_event_filter.cc
diff --git a/ash/wm/system_gesture_event_filter.cc b/ash/wm/system_gesture_event_filter.cc
index 8e12bb8787eb2f9fad2e131c9aee3ff0f3bf0711..a9b7a569456c4086419f96a9784364dc9eb44fa5 100644
--- a/ash/wm/system_gesture_event_filter.cc
+++ b/ash/wm/system_gesture_event_filter.cc
@@ -49,7 +49,6 @@ const int kAffordanceWidth = 3;
const SkColor kAffordanceFullColor = SkColorSetARGB(125, 0, 0, 255);
const SkColor kAffordanceEmptyColor = SkColorSetARGB(50, 0, 0, 255);
const int kAffordanceFrameRateHz = 60;
-const int kAffordanceStartDelay = 300;
const double kPinchThresholdForMaximize = 1.5;
const double kPinchThresholdForMinimize = 0.7;
@@ -172,18 +171,20 @@ class SystemGestureEventFilter::LongPressAffordanceAnimation
view_(NULL) {
int duration =
ui::GestureConfiguration::long_press_time_in_seconds() * 1000 -
- kAffordanceStartDelay;
+ ui::GestureConfiguration::semi_long_press_time_in_seconds() * 1000;
SetDuration(duration);
}
void ProcessEvent(aura::Window* target, aura::LocatedEvent* event) {
gfx::Point event_location;
+ int64 timer_start_time_ms =
+ ui::GestureConfiguration::semi_long_press_time_in_seconds() * 1000;
switch (event->type()) {
case ui::ET_GESTURE_TAP_DOWN:
// Start animation.
tap_down_location_ = event->root_location();
timer_.Start(FROM_HERE,
- base::TimeDelta::FromMilliseconds(kAffordanceStartDelay),
+ base::TimeDelta::FromMilliseconds(timer_start_time_ms),
this,
&LongPressAffordanceAnimation::StartAnimation);
break;
« no previous file with comments | « no previous file | chrome/browser/resources/gesture_config.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698