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 |