diff options
author | rkuroiwa <rkuroiwa@chromium.org> | 2015-03-05 17:31:45 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-06 01:32:45 +0000 |
commit | d11ebf074e93b888730d02cbd17c1cfff7022b91 (patch) | |
tree | 487a908c93874253f9ac2c6015c9105cb2eec34c /remoting/host/desktop_session_proxy.cc | |
parent | cc5a873aa82d7b56bdaf2f3160f1ceaca998f202 (diff) | |
download | chromium_src-d11ebf074e93b888730d02cbd17c1cfff7022b91.zip chromium_src-d11ebf074e93b888730d02cbd17c1cfff7022b91.tar.gz chromium_src-d11ebf074e93b888730d02cbd17c1cfff7022b91.tar.bz2 |
Connect HostEventDispatcher to InputInjector for touch events
- Implement InjectTouchEvent() methods for the code used by
the host side so that events from HostEventDispatcher gets
propagated to InputInjector.
- Add protocol/test_event_matchers.h for sharing matchers
across tests.
BUG=314515
Review URL: https://codereview.chromium.org/947643002
Cr-Commit-Position: refs/heads/master@{#319386}
Diffstat (limited to 'remoting/host/desktop_session_proxy.cc')
-rw-r--r-- | remoting/host/desktop_session_proxy.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc index b321655..7d1fc7e4 100644 --- a/remoting/host/desktop_session_proxy.cc +++ b/remoting/host/desktop_session_proxy.cc @@ -386,6 +386,19 @@ void DesktopSessionProxy::InjectMouseEvent(const protocol::MouseEvent& event) { new ChromotingNetworkDesktopMsg_InjectMouseEvent(serialized_event)); } +void DesktopSessionProxy::InjectTouchEvent(const protocol::TouchEvent& event) { + DCHECK(caller_task_runner_->BelongsToCurrentThread()); + + std::string serialized_event; + if (!event.SerializeToString(&serialized_event)) { + LOG(ERROR) << "Failed to serialize protocol::TouchEvent."; + return; + } + + SendToDesktop( + new ChromotingNetworkDesktopMsg_InjectTouchEvent(serialized_event)); +} + void DesktopSessionProxy::StartInputInjector( scoped_ptr<protocol::ClipboardStub> client_clipboard) { DCHECK(caller_task_runner_->BelongsToCurrentThread()); |