diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-27 20:25:39 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-27 20:25:39 +0000 |
commit | 529bbd15cb37ed16f96efb0de94b8ccf73cd1787 (patch) | |
tree | 6b488f4cd318eaf553b90df389f3f325640cf7c8 /remoting/host/desktop_session_proxy.cc | |
parent | 6e9def1ccf30f6747abc1597e8db10236fcb5e8a (diff) | |
download | chromium_src-529bbd15cb37ed16f96efb0de94b8ccf73cd1787.zip chromium_src-529bbd15cb37ed16f96efb0de94b8ccf73cd1787.tar.gz chromium_src-529bbd15cb37ed16f96efb0de94b8ccf73cd1787.tar.bz2 |
Add TextEvent message in the protocol
The new message will be used for non-keyboard input methods
and software keyboards.
BUG=270356
R=lambroslambrou@chromium.org, nasko@chromium.org
Review URL: https://codereview.chromium.org/197613004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259968 0039d316-1c4b-4281-b951-d872f2087c98
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 058a2f4..d077d5a 100644 --- a/remoting/host/desktop_session_proxy.cc +++ b/remoting/host/desktop_session_proxy.cc @@ -353,6 +353,19 @@ void DesktopSessionProxy::InjectKeyEvent(const protocol::KeyEvent& event) { new ChromotingNetworkDesktopMsg_InjectKeyEvent(serialized_event)); } +void DesktopSessionProxy::InjectTextEvent(const protocol::TextEvent& event) { + DCHECK(caller_task_runner_->BelongsToCurrentThread()); + + std::string serialized_event; + if (!event.SerializeToString(&serialized_event)) { + LOG(ERROR) << "Failed to serialize protocol::TextEvent."; + return; + } + + SendToDesktop( + new ChromotingNetworkDesktopMsg_InjectTextEvent(serialized_event)); +} + void DesktopSessionProxy::InjectMouseEvent(const protocol::MouseEvent& event) { DCHECK(caller_task_runner_->BelongsToCurrentThread()); |