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

Unified Diff: remoting/client/input_handler.cc

Issue 6697024: client-side wheel mouse support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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: remoting/client/input_handler.cc
diff --git a/remoting/client/input_handler.cc b/remoting/client/input_handler.cc
index c203f54fb4962830e8b014a01d54280a4aaece3f..fe120d0250df7f78abdb0f9a45f83e6f5088ad94 100644
--- a/remoting/client/input_handler.cc
+++ b/remoting/client/input_handler.cc
@@ -55,4 +55,19 @@ void InputHandler::SendMouseButtonEvent(bool button_down,
}
}
+void InputHandler::SendMouseWheelEvent(int dx, int dy,
+ int clicks_x, int clicks_y, bool page) {
+ protocol::InputStub* stub = connection_->input_stub();
+ if (stub) {
+ MouseEvent* event = new MouseEvent();
+ event->set_wheel_offset_x(dx);
+ event->set_wheel_offset_y(dy);
+ event->set_wheel_clicks_x(clicks_x);
+ event->set_wheel_clicks_y(clicks_y);
+ event->set_wheel_by_page(page);
+
+ stub->InjectMouseEvent(event, new DeleteTask<MouseEvent>(event));
Wez 2011/03/16 11:40:40 Niggle: I'm not keen on "InjectXXX" as client-sid
garykac 2011/03/16 20:43:43 This is a side-effect of having a common stub inte
+ }
+}
+
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698