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

Side by Side Diff: ui/events/event_utils.h

Issue 212603005: Don't handle NaturalScroll in Chrome but pass it to CMT instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Ash unit tests Created 6 years, 8 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 | « chrome/browser/ui/views/ash/tab_scrubber.cc ('k') | ui/events/x/device_data_manager.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_EVENTS_EVENT_UTILS_H_ 5 #ifndef UI_EVENTS_EVENT_UTILS_H_
6 #define UI_EVENTS_EVENT_UTILS_H_ 6 #define UI_EVENTS_EVENT_UTILS_H_
7 7
8 #include "base/event_types.h" 8 #include "base/event_types.h"
9 #include "ui/events/event_constants.h" 9 #include "ui/events/event_constants.h"
10 #include "ui/events/keycodes/keyboard_codes.h" 10 #include "ui/events/keycodes/keyboard_codes.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 float* x_offset, 116 float* x_offset,
117 float* y_offset, 117 float* y_offset,
118 float* x_offset_ordinal, 118 float* x_offset_ordinal,
119 float* y_offset_ordinal, 119 float* y_offset_ordinal,
120 int* finger_count); 120 int* finger_count);
121 121
122 EVENTS_EXPORT bool GetGestureTimes(const base::NativeEvent& native_event, 122 EVENTS_EXPORT bool GetGestureTimes(const base::NativeEvent& native_event,
123 double* start_time, 123 double* start_time,
124 double* end_time); 124 double* end_time);
125 125
126 // Enable/disable natural scrolling for touchpads.
127 EVENTS_EXPORT void SetNaturalScroll(bool enabled);
128
129 // In natural scrolling enabled for touchpads?
130 EVENTS_EXPORT bool IsNaturalScrollEnabled();
131
132 // Returns whether natural scrolling should be used for touchpad. 126 // Returns whether natural scrolling should be used for touchpad.
133 EVENTS_EXPORT bool ShouldDefaultToNaturalScroll(); 127 EVENTS_EXPORT bool ShouldDefaultToNaturalScroll();
134 128
135 // Returns whether or not the internal display produces touch events. 129 // Returns whether or not the internal display produces touch events.
136 EVENTS_EXPORT gfx::Display::TouchSupport GetInternalDisplayTouchSupport(); 130 EVENTS_EXPORT gfx::Display::TouchSupport GetInternalDisplayTouchSupport();
137 131
138 // Was this event generated by a touchpad device? 132 // Was this event generated by a touchpad device?
139 // The caller is responsible for ensuring that this is a mouse/touchpad event 133 // The caller is responsible for ensuring that this is a mouse/touchpad event
140 // before calling this function. 134 // before calling this function.
141 EVENTS_EXPORT bool IsTouchpadEvent(const base::NativeEvent& event); 135 EVENTS_EXPORT bool IsTouchpadEvent(const base::NativeEvent& event);
(...skipping 11 matching lines...) Expand all
153 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam); 147 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam);
154 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); 148 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code);
155 #endif 149 #endif
156 150
157 // Registers a custom event type. 151 // Registers a custom event type.
158 EVENTS_EXPORT int RegisterCustomEventType(); 152 EVENTS_EXPORT int RegisterCustomEventType();
159 153
160 } // namespace ui 154 } // namespace ui
161 155
162 #endif // UI_EVENTS_EVENT_UTILS_H_ 156 #endif // UI_EVENTS_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/tab_scrubber.cc ('k') | ui/events/x/device_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698