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

Unified Diff: content/browser/renderer_host/web_input_event_aurax11.cc

Issue 8907005: Add support for new scroll valuators coming from CMT (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review nits Created 9 years 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
« no previous file with comments | « content/browser/renderer_host/web_input_event_aura.cc ('k') | ui/aura/event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/web_input_event_aurax11.cc
diff --git a/content/browser/renderer_host/web_input_event_aurax11.cc b/content/browser/renderer_host/web_input_event_aurax11.cc
index 634e44c72e792526c7ce1753c2e46cec7c681e19..67e099303ee74d7cf2469a55b82ab1826c5d151c 100644
--- a/content/browser/renderer_host/web_input_event_aurax11.cc
+++ b/content/browser/renderer_host/web_input_event_aurax11.cc
@@ -273,6 +273,23 @@ WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent(
return webkit_event;
}
+WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent(
+ aura::ScrollEvent* event) {
+ WebKit::WebMouseWheelEvent webkit_event;
+
+ webkit_event.type = WebKit::WebInputEvent::MouseWheel;
+ webkit_event.button = WebKit::WebMouseEvent::ButtonNone;
+ webkit_event.modifiers = EventFlagsToWebEventModifiers(event->flags());
+ webkit_event.timeStampSeconds = event->time_stamp().ToDoubleT();
+ // TODO(davemoore) Support X offset, once cmt generates better data.
+ if (abs(event->y_offset()) >= 1) {
+ webkit_event.deltaY = event->y_offset();
+ webkit_event.wheelTicksY = webkit_event.deltaY > 0 ? 1 : -1;
+ }
+
+ return webkit_event;
+}
+
WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent(
aura::KeyEvent* event) {
base::NativeEvent native_event = event->native_event();
« no previous file with comments | « content/browser/renderer_host/web_input_event_aura.cc ('k') | ui/aura/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698