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

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

Issue 9958146: Revert 130500 - Merge 130082 - Add an injectKeyEvent API to the Chromoting client plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src/
Patch Set: Created 8 years, 9 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/chromoting_instance.h ('k') | remoting/webapp/client_plugin.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_instance.cc
===================================================================
--- remoting/client/plugin/chromoting_instance.cc (revision 130517)
+++ remoting/client/plugin/chromoting_instance.cc (working copy)
@@ -248,21 +248,6 @@
OnIncomingIq(iq);
} else if (method == "releaseAllKeys") {
ReleaseAllKeys();
- } else if (method == "injectKeyEvent") {
- int usb_keycode = 0;
- bool is_pressed = false;
- if (!data->GetInteger("usb_keycode", &usb_keycode) ||
- !data->GetBoolean("pressed", &is_pressed)) {
- LOG(ERROR) << "Invalid injectKeyEvent.";
- return;
- }
-
- protocol::KeyEvent event;
- event.set_usb_keycode(usb_keycode);
- event.set_pressed(is_pressed);
- // Even though new hosts will ignore keycode, it's a required field.
- event.set_keycode(0);
- InjectKeyEvent(event);
}
}
@@ -405,15 +390,11 @@
}
void ChromotingInstance::ReleaseAllKeys() {
- if (key_event_tracker_.get())
+ if (key_event_tracker_.get()) {
key_event_tracker_->ReleaseAllKeys();
+ }
}
-void ChromotingInstance::InjectKeyEvent(const protocol::KeyEvent& event) {
- if (key_event_tracker_.get())
- key_event_tracker_->InjectKeyEvent(event);
-}
-
ChromotingStats* ChromotingInstance::GetStats() {
if (!client_.get())
return NULL;
« no previous file with comments | « remoting/client/plugin/chromoting_instance.h ('k') | remoting/webapp/client_plugin.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698