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

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

Issue 3175028: Add mouse event support to Chromoting client (Pepper and X11). (Closed)
Patch Set: Remove win float/int conversion Created 10 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
« no previous file with comments | « remoting/client/plugin/pepper_input_handler.h ('k') | remoting/client/x11_input_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 96e81495d6cf2b045eb2d781560bdb56d4ce7f5a..40f299eaeae8ae0571b6a7801c6cc9dd761bf4b4 100644
--- a/remoting/client/plugin/pepper_input_handler.cc
+++ b/remoting/client/plugin/pepper_input_handler.cc
@@ -16,7 +16,27 @@ PepperInputHandler::~PepperInputHandler() {
}
void PepperInputHandler::Initialize() {
- // TODO(garykac): Implement this.
+}
+
+void PepperInputHandler::HandleMouseMoveEvent(const PP_Event_Mouse& event) {
+ SendMouseMoveEvent(static_cast<int>(event.x),
+ static_cast<int>(event.y));
+}
+
+void PepperInputHandler::HandleMouseButtonEvent(bool button_down,
+ const PP_Event_Mouse& event) {
+ MouseButton button = MouseButtonUndefined;
+ if (event.button == PP_EVENT_MOUSEBUTTON_LEFT) {
+ button = MouseButtonLeft;
+ } else if (event.button == PP_EVENT_MOUSEBUTTON_MIDDLE) {
+ button = MouseButtonMiddle;
+ } else if (event.button == PP_EVENT_MOUSEBUTTON_RIGHT) {
+ button = MouseButtonRight;
+ }
+
+ if (button != MouseButtonUndefined) {
+ SendMouseButtonEvent(button_down, button);
+ }
}
} // namespace remoting
« no previous file with comments | « remoting/client/plugin/pepper_input_handler.h ('k') | remoting/client/x11_input_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698