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

Unified Diff: ui/events/gesture_detection/gesture_config_helper_aura.cc

Issue 1287103004: Sync ui/events to chromium @ https://codereview.chromium.org/1210203002 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 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
Index: ui/events/gesture_detection/gesture_config_helper_aura.cc
diff --git a/ui/events/gesture_detection/gesture_config_helper_aura.cc b/ui/events/gesture_detection/gesture_config_helper_aura.cc
deleted file mode 100644
index 164f3c9e2f53ef36753f5c7820606a069b73b98c..0000000000000000000000000000000000000000
--- a/ui/events/gesture_detection/gesture_config_helper_aura.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/events/gesture_detection/gesture_config_helper.h"
-
-#include <cmath>
-
-#include "base/command_line.h"
-#include "ui/events/event_switches.h"
-#include "ui/events/gestures/gesture_configuration.h"
-
-namespace ui {
-namespace {
-
-GestureDetector::Config DefaultGestureDetectorConfig() {
- GestureDetector::Config config;
-
- config.longpress_timeout = base::TimeDelta::FromMilliseconds(
- GestureConfiguration::long_press_time_in_ms());
- config.showpress_timeout = base::TimeDelta::FromMilliseconds(
- GestureConfiguration::show_press_delay_in_ms());
- config.double_tap_timeout = base::TimeDelta::FromMilliseconds(
- GestureConfiguration::semi_long_press_time_in_ms());
- config.touch_slop =
- GestureConfiguration::max_touch_move_in_pixels_for_click();
- config.double_tap_slop =
- GestureConfiguration::max_distance_between_taps_for_double_tap();
- config.minimum_fling_velocity =
- GestureConfiguration::min_scroll_velocity();
- config.maximum_fling_velocity = GestureConfiguration::fling_velocity_cap();
- config.swipe_enabled = true;
- config.minimum_swipe_velocity = GestureConfiguration::min_swipe_speed();
- config.maximum_swipe_deviation_angle =
- GestureConfiguration::max_swipe_deviation_angle();
- config.two_finger_tap_enabled = true;
- config.two_finger_tap_max_separation =
- GestureConfiguration::max_distance_for_two_finger_tap_in_pixels();
- config.two_finger_tap_timeout = base::TimeDelta::FromMilliseconds(
- GestureConfiguration::max_touch_down_duration_for_click_in_ms());
-
- return config;
-}
-
-ScaleGestureDetector::Config DefaultScaleGestureDetectorConfig() {
- ScaleGestureDetector::Config config;
- config.span_slop =
- GestureConfiguration::max_touch_move_in_pixels_for_click() * 2;
- config.min_scaling_touch_major = GestureConfiguration::default_radius() * 2;
- config.min_scaling_span = GestureConfiguration::min_scaling_span_in_pixels();
- config.min_pinch_update_span_delta = 0;
- return config;
-}
-
-} // namespace
-
-GestureProvider::Config DefaultGestureProviderConfig() {
- GestureProvider::Config config;
- config.gesture_detector_config = DefaultGestureDetectorConfig();
- config.scale_gesture_detector_config = DefaultScaleGestureDetectorConfig();
- config.gesture_begin_end_types_enabled = true;
- // Half the size of the default touch length is a reasonable minimum.
- config.min_gesture_bounds_length = GestureConfiguration::default_radius();
- return config;
-}
-
-} // namespace ui
« no previous file with comments | « ui/events/gesture_detection/gesture_config_helper_android.cc ('k') | ui/events/gesture_detection/gesture_configuration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698