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

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

Issue 7466002: Reland http://codereview.chromium.org/7452002/, update chromoting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 5 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') | webkit/plugins/ppapi/event_conversion.cc » ('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 452668e58231e2ba261bbc11c4e81583a77efc16..f94a4028695fa458b50dcb3df9cd09cb66095e26 100644
--- a/remoting/client/plugin/pepper_input_handler.cc
+++ b/remoting/client/plugin/pepper_input_handler.cc
@@ -5,11 +5,15 @@
#include "remoting/client/plugin/pepper_input_handler.h"
#include "ppapi/c/pp_input_event.h"
+#include "ppapi/cpp/input_event.h"
+#include "ppapi/cpp/point.h"
#include "remoting/client/chromoting_view.h"
#include "ui/gfx/point.h"
namespace remoting {
+using pp::KeyboardInputEvent;
+using pp::MouseInputEvent;
using protocol::KeyEvent;
using protocol::MouseEvent;
@@ -26,33 +30,31 @@ void PepperInputHandler::Initialize() {
}
void PepperInputHandler::HandleKeyEvent(bool keydown,
- const PP_InputEvent_Key& event) {
- SendKeyEvent(keydown, event.key_code);
+ const KeyboardInputEvent& event) {
+ SendKeyEvent(keydown, event.GetKeyCode());
}
-void PepperInputHandler::HandleCharacterEvent(
- const PP_InputEvent_Character& event) {
+void PepperInputHandler::HandleCharacterEvent(const KeyboardInputEvent& event) {
// TODO(garykac): Coordinate key and char events.
}
-void PepperInputHandler::HandleMouseMoveEvent(
- const PP_InputEvent_Mouse& event) {
- gfx::Point p(static_cast<int>(event.x), static_cast<int>(event.y));
+void PepperInputHandler::HandleMouseMoveEvent(const MouseInputEvent& event) {
+ gfx::Point p(static_cast<int>(event.GetMousePosition().x()),
+ static_cast<int>(event.GetMousePosition().y()));
// Pepper gives co-ordinates in the plugin instance's co-ordinate system,
// which may be different from the host desktop's co-ordinate system.
p = view_->ConvertScreenToHost(p);
SendMouseMoveEvent(p.x(), p.y());
}
-void PepperInputHandler::HandleMouseButtonEvent(
- bool button_down,
- const PP_InputEvent_Mouse& event) {
+void PepperInputHandler::HandleMouseButtonEvent(bool button_down,
+ const MouseInputEvent& event) {
MouseEvent::MouseButton button = MouseEvent::BUTTON_UNDEFINED;
- if (event.button == PP_INPUTEVENT_MOUSEBUTTON_LEFT) {
+ if (event.GetMouseButton() == PP_INPUTEVENT_MOUSEBUTTON_LEFT) {
button = MouseEvent::BUTTON_LEFT;
- } else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_MIDDLE) {
+ } else if (event.GetMouseButton() == PP_INPUTEVENT_MOUSEBUTTON_MIDDLE) {
button = MouseEvent::BUTTON_MIDDLE;
- } else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_RIGHT) {
+ } else if (event.GetMouseButton() == PP_INPUTEVENT_MOUSEBUTTON_RIGHT) {
button = MouseEvent::BUTTON_RIGHT;
}
« no previous file with comments | « remoting/client/plugin/pepper_input_handler.h ('k') | webkit/plugins/ppapi/event_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698