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

Unified Diff: remoting/client/plugin/pepper_input_handler.cc

Issue 6697024: client-side wheel mouse support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unused usings Created 9 years, 2 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/plugin/pepper_input_handler.cc
diff --git a/remoting/client/plugin/pepper_input_handler.cc b/remoting/client/plugin/pepper_input_handler.cc
index e07ff43cd7571417fd223f3b61ad9c695dbf1504..6b433c9ab736b07dc65981b62596998ba66c661a 100644
--- a/remoting/client/plugin/pepper_input_handler.cc
+++ b/remoting/client/plugin/pepper_input_handler.cc
@@ -10,9 +10,6 @@
namespace remoting {
-using pp::KeyboardInputEvent;
-using pp::MouseInputEvent;
-using protocol::KeyEvent;
using protocol::MouseEvent;
PepperInputHandler::PepperInputHandler(ClientContext* context,
@@ -78,4 +75,11 @@ void PepperInputHandler::HandleMouseButtonEvent(
}
}
+void PepperInputHandler::HandleMouseWheelEvent(
+ const pp::WheelInputEvent& event) {
+ pp::FloatPoint ticks = event.GetTicks();
+ SendMouseWheelEvent(static_cast<int>(ticks.x()),
Wez 2011/10/13 00:38:01 Do we really want to static_cast<int>() these? Wo
Lambros 2011/10/13 01:10:23 I'm curious to know why these are floats in the fi
Wez 2011/10/13 01:20:05 Looking at the spec for GetTicks(), it seems that
garykac 2011/10/13 21:18:53 In practice, for a scroll wheel these are always i
garykac 2011/10/13 21:18:53 They're always integral values (stored as a float)
garykac 2011/10/13 21:18:53 Done.
+ static_cast<int>(ticks.y()));
+}
+
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698