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

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

Issue 1033913003: Touch Events capability negotiation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change setter to public and add license header Created 5 years, 6 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/host/basic_desktop_environment.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 3aff7d7c386a382a81a60f9dd1cda2ea0c95501b..c32d31ded27bcd4d333f047d9af82c1536d5442a 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -353,7 +353,7 @@ void ChromotingInstance::HandleMessage(const pp::Var& message) {
} else if (method == "enableDebugRegion") {
HandleEnableDebugRegion(*data);
} else if (method == "enableTouchEvents") {
- HandleEnableTouchEvents();
+ HandleEnableTouchEvents(*data);
}
}
@@ -985,8 +985,19 @@ void ChromotingInstance::HandleEnableDebugRegion(
video_renderer_->EnableDebugDirtyRegion(enable);
}
-void ChromotingInstance::HandleEnableTouchEvents() {
- RequestInputEvents(PP_INPUTEVENT_CLASS_TOUCH);
+void ChromotingInstance::HandleEnableTouchEvents(
+ const base::DictionaryValue& data) {
+ bool enable = false;
+ if (!data.GetBoolean("enable", &enable)) {
+ LOG(ERROR) << "Invalid handleTouchEvents.";
+ return;
+ }
+
+ if (enable) {
+ RequestInputEvents(PP_INPUTEVENT_CLASS_TOUCH);
+ } else {
+ ClearInputEventRequest(PP_INPUTEVENT_CLASS_TOUCH);
+ }
}
void ChromotingInstance::Disconnect() {
« no previous file with comments | « remoting/client/plugin/chromoting_instance.h ('k') | remoting/host/basic_desktop_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698