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

Side by Side Diff: ui/events/gesture_detection/gesture_config_helper_aura.cc

Issue 298823006: [Aura] Reduce frequency of PinchUpdate events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Jared's comments. Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/events/gesture_detection/gesture_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // MSVC++ requires this to be set before any other includes to get M_PI. 5 // MSVC++ requires this to be set before any other includes to get M_PI.
6 #define _USE_MATH_DEFINES 6 #define _USE_MATH_DEFINES
7 7
8 #include "ui/events/gesture_detection/gesture_config_helper.h" 8 #include "ui/events/gesture_detection/gesture_config_helper.h"
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 return config; 46 return config;
47 } 47 }
48 48
49 ScaleGestureDetector::Config DefaultScaleGestureDetectorConfig() { 49 ScaleGestureDetector::Config DefaultScaleGestureDetectorConfig() {
50 ScaleGestureDetector::Config config; 50 ScaleGestureDetector::Config config;
51 51
52 config.gesture_detector_config = DefaultGestureDetectorConfig(); 52 config.gesture_detector_config = DefaultGestureDetectorConfig();
53 config.min_scaling_touch_major = GestureConfiguration::default_radius() * 2; 53 config.min_scaling_touch_major = GestureConfiguration::default_radius() * 2;
54 config.min_scaling_span = GestureConfiguration::min_scaling_span_in_pixels(); 54 config.min_scaling_span = GestureConfiguration::min_scaling_span_in_pixels();
55 config.min_pinch_update_span_delta =
56 GestureConfiguration::min_pinch_update_distance_in_pixels();
55 return config; 57 return config;
56 } 58 }
57 59
58 } // namespace 60 } // namespace
59 61
60 GestureProvider::Config DefaultGestureProviderConfig() { 62 GestureProvider::Config DefaultGestureProviderConfig() {
61 GestureProvider::Config config; 63 GestureProvider::Config config;
62 config.display = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); 64 config.display = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
63 config.gesture_detector_config = DefaultGestureDetectorConfig(); 65 config.gesture_detector_config = DefaultGestureDetectorConfig();
64 config.scale_gesture_detector_config = DefaultScaleGestureDetectorConfig(); 66 config.scale_gesture_detector_config = DefaultScaleGestureDetectorConfig();
65 config.gesture_begin_end_types_enabled = true; 67 config.gesture_begin_end_types_enabled = true;
66 return config; 68 return config;
67 } 69 }
68 70
69 } // namespace ui 71 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/events/gesture_detection/gesture_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698