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

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

Issue 42863003: cros: Default to natural scrolling if the internal diplay is a touchscreen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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/chromeos/chrome_browser_main_chromeos.cc ('k') | ui/events/event_utils.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 (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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 EVENTS_EXPORT bool GetGestureTimes(const base::NativeEvent& native_event, 117 EVENTS_EXPORT bool GetGestureTimes(const base::NativeEvent& native_event,
118 double* start_time, 118 double* start_time,
119 double* end_time); 119 double* end_time);
120 120
121 // Enable/disable natural scrolling for touchpads. 121 // Enable/disable natural scrolling for touchpads.
122 EVENTS_EXPORT void SetNaturalScroll(bool enabled); 122 EVENTS_EXPORT void SetNaturalScroll(bool enabled);
123 123
124 // In natural scrolling enabled for touchpads? 124 // In natural scrolling enabled for touchpads?
125 EVENTS_EXPORT bool IsNaturalScrollEnabled(); 125 EVENTS_EXPORT bool IsNaturalScrollEnabled();
126 126
127 // Returns whether natural scrolling should be used for touchpad.
128 EVENTS_EXPORT bool ShouldDefaultToNaturalScroll();
129
127 // Was this event generated by a touchpad device? 130 // Was this event generated by a touchpad device?
128 // The caller is responsible for ensuring that this is a mouse/touchpad event 131 // The caller is responsible for ensuring that this is a mouse/touchpad event
129 // before calling this function. 132 // before calling this function.
130 EVENTS_EXPORT bool IsTouchpadEvent(const base::NativeEvent& event); 133 EVENTS_EXPORT bool IsTouchpadEvent(const base::NativeEvent& event);
131 134
132 // Returns true if event is noop. 135 // Returns true if event is noop.
133 EVENTS_EXPORT bool IsNoopEvent(const base::NativeEvent& event); 136 EVENTS_EXPORT bool IsNoopEvent(const base::NativeEvent& event);
134 137
135 // Creates and returns no-op event. 138 // Creates and returns no-op event.
136 EVENTS_EXPORT base::NativeEvent CreateNoopEvent(); 139 EVENTS_EXPORT base::NativeEvent CreateNoopEvent();
(...skipping 10 matching lines...) Expand all
147 // Returns true if default post-target handling was canceled for |event| after 150 // Returns true if default post-target handling was canceled for |event| after
148 // its dispatch to its target. 151 // its dispatch to its target.
149 EVENTS_EXPORT bool EventCanceledDefaultHandling(const Event& event); 152 EVENTS_EXPORT bool EventCanceledDefaultHandling(const Event& event);
150 153
151 // Registers a custom event type. 154 // Registers a custom event type.
152 EVENTS_EXPORT int RegisterCustomEventType(); 155 EVENTS_EXPORT int RegisterCustomEventType();
153 156
154 } // namespace ui 157 } // namespace ui
155 158
156 #endif // UI_EVENTS_EVENT_UTILS_H_ 159 #endif // UI_EVENTS_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | ui/events/event_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698