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

Unified Diff: ui/events/cocoa/cocoa_event_utils.h

Issue 2226933004: Mac: Share kScrollbarPixelsPerCocoaTick between ui:: and blink:: events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unconsolidate! NSApp sendEvent is too magical Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/cocoa/cocoa_event_utils.h
diff --git a/ui/events/cocoa/cocoa_event_utils.h b/ui/events/cocoa/cocoa_event_utils.h
index a5984357537b46e66eadcaeecb56136b30471cd8..71ddab95e788483290d3b7128bacad60d190cf2a 100644
--- a/ui/events/cocoa/cocoa_event_utils.h
+++ b/ui/events/cocoa/cocoa_event_utils.h
@@ -11,6 +11,9 @@
namespace ui {
+// Conversion between wheel delta amounts and number of pixels to scroll.
+constexpr double kScrollbarPixelsPerCocoaTick = 40.0;
Avi (use Gerrit) 2016/08/10 15:17:29 Is that the new preferred style? I thought enum or
tapted 2016/08/11 01:24:08 http://go/cppguide#Use_of_constexpr is pretty much
+
// Converts the Cocoa |modifiers| bitsum into a ui::EventFlags bitsum.
EVENTS_EXPORT int EventFlagsFromModifiers(NSUInteger modifiers);

Powered by Google App Engine
This is Rietveld 408576698