| Index: remoting/client/plugin/chromoting_instance.cc
|
| diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
|
| index d4ad35f51487e7cefaacb8b8e3f58485fda627b0..d62331363a9fd148d855176a9b88e287afe9d3e2 100644
|
| --- a/remoting/client/plugin/chromoting_instance.cc
|
| +++ b/remoting/client/plugin/chromoting_instance.cc
|
| @@ -355,7 +355,7 @@ void ChromotingInstance::HandleMessage(const pp::Var& message) {
|
| } else if (method == "enableDebugRegion") {
|
| HandleEnableDebugRegion(*data);
|
| } else if (method == "enableTouchEvents") {
|
| - HandleEnableTouchEvents();
|
| + HandleEnableTouchEvents(*data);
|
| }
|
| }
|
|
|
| @@ -988,8 +988,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() {
|
|
|