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

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

Issue 7453003: Change Chromoting client to use Pepper's new Resource-base InputEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweaks 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/chromoting_view.h ('k') | remoting/client/plugin/pepper_input_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_instance.cc
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index a83c053f547560ea997fa802647216cf527913ad..af21adc170c4e161b539f2bd9e1e616fc84aa36b 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -201,14 +201,17 @@ bool ChromotingInstance::HandleInputEvent(const pp::InputEvent& event) {
return true;
}
- case PP_INPUTEVENT_TYPE_KEYDOWN:
+ case PP_INPUTEVENT_TYPE_KEYDOWN: {
+ pp::KeyboardInputEvent key = pp::KeyboardInputEvent(event);
+ logger_.VLog(3, "PP_INPUTEVENT_TYPE_KEYDOWN key=%d", key.GetKeyCode());
+ pih->HandleKeyEvent(true, key);
+ return true;
+ }
+
case PP_INPUTEVENT_TYPE_KEYUP: {
- pp::KeyboardInputEvent key_event(event);
- logger_.VLog(3, "PP_INPUTEVENT_TYPE_KEY%s key=%d",
- (event.GetType()==PP_INPUTEVENT_TYPE_KEYDOWN ? "DOWN" : "UP"),
- key_event.GetKeyCode());
- pih->HandleKeyEvent(event.GetType() == PP_INPUTEVENT_TYPE_KEYDOWN,
- key_event);
+ pp::KeyboardInputEvent key = pp::KeyboardInputEvent(event);
+ logger_.VLog(3, "PP_INPUTEVENT_TYPE_KEYUP key=%d", key.GetKeyCode());
+ pih->HandleKeyEvent(false, key);
return true;
}
@@ -217,8 +220,10 @@ bool ChromotingInstance::HandleInputEvent(const pp::InputEvent& event) {
return true;
}
- default:
+ default: {
+ LOG(INFO) << "Unhandled input event: " << event.GetType();
break;
+ }
}
return false;
« no previous file with comments | « remoting/client/chromoting_view.h ('k') | remoting/client/plugin/pepper_input_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698