| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/events/gesture_detection/gesture_provider_config_helper.h" | 5 #include "ui/events/gesture_detection/gesture_provider_config_helper.h" |
| 6 | 6 |
| 7 #include "ui/events/gesture_detection/gesture_configuration.h" | 7 #include "ui/events/gesture_detection/gesture_configuration.h" |
| 8 #include "ui/gfx/screen.h" | 8 #include "ui/gfx/screen.h" |
| 9 | 9 |
| 10 namespace ui { | 10 namespace ui { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 gesture_config.max_touch_down_duration_for_click_in_ms()); | 43 gesture_config.max_touch_down_duration_for_click_in_ms()); |
| 44 config.single_tap_repeat_interval = gesture_config.max_tap_count(); | 44 config.single_tap_repeat_interval = gesture_config.max_tap_count(); |
| 45 config.velocity_tracker_strategy = gesture_config.velocity_tracker_strategy(); | 45 config.velocity_tracker_strategy = gesture_config.velocity_tracker_strategy(); |
| 46 return config; | 46 return config; |
| 47 } | 47 } |
| 48 | 48 |
| 49 ScaleGestureDetector::Config BuildScaleGestureDetectorConfig( | 49 ScaleGestureDetector::Config BuildScaleGestureDetectorConfig( |
| 50 const GestureConfiguration& gesture_config) { | 50 const GestureConfiguration& gesture_config) { |
| 51 ScaleGestureDetector::Config config; | 51 ScaleGestureDetector::Config config; |
| 52 config.span_slop = gesture_config.span_slop(); | 52 config.span_slop = gesture_config.span_slop(); |
| 53 config.min_scaling_touch_major = gesture_config.min_scaling_touch_major(); | |
| 54 config.min_scaling_span = gesture_config.min_scaling_span_in_pixels(); | 53 config.min_scaling_span = gesture_config.min_scaling_span_in_pixels(); |
| 55 config.min_pinch_update_span_delta = | 54 config.min_pinch_update_span_delta = |
| 56 gesture_config.min_pinch_update_span_delta(); | 55 gesture_config.min_pinch_update_span_delta(); |
| 57 config.stylus_scale_enabled = gesture_config.stylus_scale_enabled(); | 56 config.stylus_scale_enabled = gesture_config.stylus_scale_enabled(); |
| 58 return config; | 57 return config; |
| 59 } | 58 } |
| 60 | 59 |
| 61 GestureProvider::Config BuildGestureProviderConfig( | 60 GestureProvider::Config BuildGestureProviderConfig( |
| 62 const GestureConfiguration& gesture_config) { | 61 const GestureConfiguration& gesture_config) { |
| 63 GestureProvider::Config config; | 62 GestureProvider::Config config; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 92 | 91 |
| 93 gfx::Screen* screen = gfx::Screen::GetScreen(); | 92 gfx::Screen* screen = gfx::Screen::GetScreen(); |
| 94 // |screen| is sometimes NULL during tests. | 93 // |screen| is sometimes NULL during tests. |
| 95 if (screen) | 94 if (screen) |
| 96 config.display = screen->GetPrimaryDisplay(); | 95 config.display = screen->GetPrimaryDisplay(); |
| 97 | 96 |
| 98 return config; | 97 return config; |
| 99 } | 98 } |
| 100 | 99 |
| 101 } // namespace ui | 100 } // namespace ui |
| OLD | NEW |