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

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

Issue 868823002: Expose double-tap platform support via ui::GestureConfiguration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix propagation Created 5 years, 11 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
« no previous file with comments | « ui/events/gesture_detection/gesture_provider.cc ('k') | no next file » | 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 #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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 gesture_config.min_pinch_update_span_delta(); 55 gesture_config.min_pinch_update_span_delta();
56 return config; 56 return config;
57 } 57 }
58 58
59 GestureProvider::Config BuildGestureProviderConfig( 59 GestureProvider::Config BuildGestureProviderConfig(
60 const GestureConfiguration& gesture_config) { 60 const GestureConfiguration& gesture_config) {
61 GestureProvider::Config config; 61 GestureProvider::Config config;
62 config.gesture_detector_config = BuildGestureDetectorConfig(gesture_config); 62 config.gesture_detector_config = BuildGestureDetectorConfig(gesture_config);
63 config.scale_gesture_detector_config = 63 config.scale_gesture_detector_config =
64 BuildScaleGestureDetectorConfig(gesture_config); 64 BuildScaleGestureDetectorConfig(gesture_config);
65 config.double_tap_support_for_platform_enabled =
66 gesture_config.double_tap_enabled();
65 config.gesture_begin_end_types_enabled = 67 config.gesture_begin_end_types_enabled =
66 gesture_config.gesture_begin_end_types_enabled(); 68 gesture_config.gesture_begin_end_types_enabled();
67 config.min_gesture_bounds_length = gesture_config.min_gesture_bounds_length(); 69 config.min_gesture_bounds_length = gesture_config.min_gesture_bounds_length();
68 config.max_gesture_bounds_length = gesture_config.max_gesture_bounds_length(); 70 config.max_gesture_bounds_length = gesture_config.max_gesture_bounds_length();
69 return config; 71 return config;
70 } 72 }
71 73
72 } // namespace 74 } // namespace
73 75
74 GestureProvider::Config GetGestureProviderConfig( 76 GestureProvider::Config GetGestureProviderConfig(
(...skipping 13 matching lines...) Expand all
88 90
89 gfx::Screen* screen = gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE); 91 gfx::Screen* screen = gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE);
90 // |screen| is sometimes NULL during tests. 92 // |screen| is sometimes NULL during tests.
91 if (screen) 93 if (screen)
92 config.display = screen->GetPrimaryDisplay(); 94 config.display = screen->GetPrimaryDisplay();
93 95
94 return config; 96 return config;
95 } 97 }
96 98
97 } // namespace ui 99 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/gesture_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698