Avi Drissman | d6cdf9b | 2022-09-15 19:52:53 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 5 | #include "remoting/host/win/session_input_injector.h" |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 6 | |
avi | c5960f3 | 2015-12-22 22:49:48 | [diff] [blame] | 7 | #include <stddef.h> |
| 8 | |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 9 | #include <set> |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 10 | #include <string> |
sergeyu | 1417e013 | 2015-12-23 19:01:22 | [diff] [blame] | 11 | #include <utility> |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 12 | |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 13 | #include "base/compiler_specific.h" |
Avi Drissman | 135261e | 2023-01-11 22:43:15 | [diff] [blame^] | 14 | #include "base/functional/bind.h" |
| 15 | #include "base/functional/callback.h" |
[email protected] | 56c5901 | 2012-08-18 23:25:32 | [diff] [blame] | 16 | #include "base/location.h" |
Hans Wennborg | 22e28d6a | 2020-06-17 17:17:21 | [diff] [blame] | 17 | #include "base/logging.h" |
Patrick Monette | 643cdf6 | 2021-10-15 19:13:42 | [diff] [blame] | 18 | #include "base/task/single_thread_task_runner.h" |
[email protected] | b9a06b3 | 2012-08-17 23:52:13 | [diff] [blame] | 19 | #include "remoting/host/sas_injector.h" |
[email protected] | efad007 | 2012-07-30 22:05:12 | [diff] [blame] | 20 | #include "remoting/proto/event.pb.h" |
[email protected] | 3aef722 | 2013-06-07 22:39:50 | [diff] [blame] | 21 | #include "third_party/webrtc/modules/desktop_capture/win/desktop.h" |
| 22 | #include "third_party/webrtc/modules/desktop_capture/win/scoped_thread_desktop.h" |
jamiewalch | aadc22f | 2015-10-12 23:25:50 | [diff] [blame] | 23 | #include "ui/events/keycodes/dom/dom_code.h" |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 24 | |
| 25 | namespace { |
| 26 | |
jamiewalch | aadc22f | 2015-10-12 23:25:50 | [diff] [blame] | 27 | bool CheckCtrlAndAltArePressed(const std::set<ui::DomCode>& pressed_keys) { |
| 28 | size_t ctrl_keys = pressed_keys.count(ui::DomCode::CONTROL_LEFT) + |
| 29 | pressed_keys.count(ui::DomCode::CONTROL_RIGHT); |
| 30 | size_t alt_keys = pressed_keys.count(ui::DomCode::ALT_LEFT) + |
| 31 | pressed_keys.count(ui::DomCode::ALT_RIGHT); |
[email protected] | 3ac30fdc | 2012-04-06 07:41:21 | [diff] [blame] | 32 | return ctrl_keys != 0 && alt_keys != 0 && |
| 33 | (ctrl_keys + alt_keys == pressed_keys.size()); |
| 34 | } |
| 35 | |
joedow | 83eff38 | 2016-04-29 16:51:14 | [diff] [blame] | 36 | bool IsWinKeyPressed(const std::set<ui::DomCode>& pressed_keys) { |
| 37 | size_t win_keys = pressed_keys.count(ui::DomCode::META_LEFT) + |
| 38 | pressed_keys.count(ui::DomCode::META_RIGHT); |
| 39 | return win_keys != 0 && win_keys == pressed_keys.size(); |
| 40 | } |
| 41 | |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 42 | } // namespace |
| 43 | |
| 44 | namespace remoting { |
| 45 | |
[email protected] | 9febc508 | 2012-03-17 00:50:28 | [diff] [blame] | 46 | using protocol::ClipboardEvent; |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 47 | using protocol::KeyEvent; |
[email protected] | 529bbd1 | 2014-03-27 20:25:39 | [diff] [blame] | 48 | using protocol::MouseEvent; |
| 49 | using protocol::TextEvent; |
rkuroiwa | 0e68803f | 2015-02-26 19:41:42 | [diff] [blame] | 50 | using protocol::TouchEvent; |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 51 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 52 | class SessionInputInjectorWin::Core |
| 53 | : public base::RefCountedThreadSafe<SessionInputInjectorWin::Core>, |
| 54 | public InputInjector { |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 55 | public: |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 56 | Core(scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
| 57 | std::unique_ptr<InputInjector> nested_executor, |
| 58 | scoped_refptr<base::SingleThreadTaskRunner> inject_sas_task_runner, |
Evan Stade | af37ba3 | 2020-06-26 20:36:37 | [diff] [blame] | 59 | const base::RepeatingClosure& inject_sas, |
| 60 | const base::RepeatingClosure& lock_workstation); |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 61 | |
Peter Boström | 7c0127b | 2021-10-05 18:39:56 | [diff] [blame] | 62 | Core(const Core&) = delete; |
| 63 | Core& operator=(const Core&) = delete; |
| 64 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 65 | // InputInjector implementation. |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 66 | void Start(std::unique_ptr<ClipboardStub> client_clipboard) override; |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 67 | |
| 68 | // protocol::ClipboardStub implementation. |
nick | 697f429 | 2015-04-23 18:22:31 | [diff] [blame] | 69 | void InjectClipboardEvent(const ClipboardEvent& event) override; |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 70 | |
| 71 | // protocol::InputStub implementation. |
nick | 697f429 | 2015-04-23 18:22:31 | [diff] [blame] | 72 | void InjectKeyEvent(const KeyEvent& event) override; |
| 73 | void InjectTextEvent(const TextEvent& event) override; |
| 74 | void InjectMouseEvent(const MouseEvent& event) override; |
| 75 | void InjectTouchEvent(const TouchEvent& event) override; |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 76 | |
| 77 | private: |
| 78 | friend class base::RefCountedThreadSafe<Core>; |
nick | 697f429 | 2015-04-23 18:22:31 | [diff] [blame] | 79 | ~Core() override; |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 80 | |
| 81 | // Switches to the desktop receiving a user input if different from |
| 82 | // the current one. |
| 83 | void SwitchToInputDesktop(); |
| 84 | |
| 85 | scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; |
| 86 | |
| 87 | // Pointer to the next event executor. |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 88 | std::unique_ptr<InputInjector> nested_executor_; |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 89 | |
joedow | 83eff38 | 2016-04-29 16:51:14 | [diff] [blame] | 90 | scoped_refptr<base::SingleThreadTaskRunner> execute_action_task_runner_; |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 91 | |
[email protected] | 3aef722 | 2013-06-07 22:39:50 | [diff] [blame] | 92 | webrtc::ScopedThreadDesktop desktop_; |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 93 | |
joedow | 7da9460 | 2016-06-07 00:18:04 | [diff] [blame] | 94 | // Used to inject Secure Attention Sequence. |
Evan Stade | af37ba3 | 2020-06-26 20:36:37 | [diff] [blame] | 95 | base::RepeatingClosure inject_sas_; |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 96 | |
joedow | 83eff38 | 2016-04-29 16:51:14 | [diff] [blame] | 97 | // Used to lock the current session on non-home SKUs of Windows. |
Evan Stade | af37ba3 | 2020-06-26 20:36:37 | [diff] [blame] | 98 | base::RepeatingClosure lock_workstation_; |
joedow | 83eff38 | 2016-04-29 16:51:14 | [diff] [blame] | 99 | |
joedow | 83eff38 | 2016-04-29 16:51:14 | [diff] [blame] | 100 | // Keys currently pressed by the client, used to detect key sequences. |
jamiewalch | aadc22f | 2015-10-12 23:25:50 | [diff] [blame] | 101 | std::set<ui::DomCode> pressed_keys_; |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 102 | }; |
| 103 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 104 | SessionInputInjectorWin::Core::Core( |
[email protected] | e8f8dcee | 2012-11-02 00:16:05 | [diff] [blame] | 105 | scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 106 | std::unique_ptr<InputInjector> nested_executor, |
joedow | 83eff38 | 2016-04-29 16:51:14 | [diff] [blame] | 107 | scoped_refptr<base::SingleThreadTaskRunner> execute_action_task_runner, |
Evan Stade | af37ba3 | 2020-06-26 20:36:37 | [diff] [blame] | 108 | const base::RepeatingClosure& inject_sas, |
| 109 | const base::RepeatingClosure& lock_workstation) |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 110 | : input_task_runner_(input_task_runner), |
sergeyu | 1417e013 | 2015-12-23 19:01:22 | [diff] [blame] | 111 | nested_executor_(std::move(nested_executor)), |
joedow | 83eff38 | 2016-04-29 16:51:14 | [diff] [blame] | 112 | execute_action_task_runner_(execute_action_task_runner), |
| 113 | inject_sas_(inject_sas), |
| 114 | lock_workstation_(lock_workstation) {} |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 115 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 116 | void SessionInputInjectorWin::Core::Start( |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 117 | std::unique_ptr<protocol::ClipboardStub> client_clipboard) { |
[email protected] | e8f8dcee | 2012-11-02 00:16:05 | [diff] [blame] | 118 | if (!input_task_runner_->BelongsToCurrentThread()) { |
| 119 | input_task_runner_->PostTask( |
[email protected] | 3f9c3943 | 2012-06-02 01:05:32 | [diff] [blame] | 120 | FROM_HERE, |
kylechar | 2caf4d6 | 2019-02-15 20:03:42 | [diff] [blame] | 121 | base::BindOnce(&Core::Start, this, std::move(client_clipboard))); |
[email protected] | 3f9c3943 | 2012-06-02 01:05:32 | [diff] [blame] | 122 | return; |
| 123 | } |
| 124 | |
sergeyu | 1417e013 | 2015-12-23 19:01:22 | [diff] [blame] | 125 | nested_executor_->Start(std::move(client_clipboard)); |
[email protected] | 6d17db9 | 2012-05-11 17:03:14 | [diff] [blame] | 126 | } |
| 127 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 128 | void SessionInputInjectorWin::Core::InjectClipboardEvent( |
[email protected] | 9febc508 | 2012-03-17 00:50:28 | [diff] [blame] | 129 | const ClipboardEvent& event) { |
[email protected] | e8f8dcee | 2012-11-02 00:16:05 | [diff] [blame] | 130 | if (!input_task_runner_->BelongsToCurrentThread()) { |
| 131 | input_task_runner_->PostTask( |
kylechar | 2caf4d6 | 2019-02-15 20:03:42 | [diff] [blame] | 132 | FROM_HERE, base::BindOnce(&Core::InjectClipboardEvent, this, event)); |
[email protected] | 3f9c3943 | 2012-06-02 01:05:32 | [diff] [blame] | 133 | return; |
| 134 | } |
| 135 | |
| 136 | nested_executor_->InjectClipboardEvent(event); |
[email protected] | 9febc508 | 2012-03-17 00:50:28 | [diff] [blame] | 137 | } |
| 138 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 139 | void SessionInputInjectorWin::Core::InjectKeyEvent(const KeyEvent& event) { |
[email protected] | e8f8dcee | 2012-11-02 00:16:05 | [diff] [blame] | 140 | if (!input_task_runner_->BelongsToCurrentThread()) { |
| 141 | input_task_runner_->PostTask( |
kylechar | 2caf4d6 | 2019-02-15 20:03:42 | [diff] [blame] | 142 | FROM_HERE, base::BindOnce(&Core::InjectKeyEvent, this, event)); |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 143 | return; |
| 144 | } |
| 145 | |
[email protected] | 3ac30fdc | 2012-04-06 07:41:21 | [diff] [blame] | 146 | // HostEventDispatcher should drop events lacking the pressed field. |
| 147 | DCHECK(event.has_pressed()); |
| 148 | |
| 149 | if (event.has_usb_keycode()) { |
jamiewalch | aadc22f | 2015-10-12 23:25:50 | [diff] [blame] | 150 | ui::DomCode dom_code = static_cast<ui::DomCode>(event.usb_keycode()); |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 151 | if (event.pressed()) { |
[email protected] | 3ac30fdc | 2012-04-06 07:41:21 | [diff] [blame] | 152 | // Simulate secure attention sequence if Ctrl-Alt-Del was just pressed. |
jamiewalch | aadc22f | 2015-10-12 23:25:50 | [diff] [blame] | 153 | if (dom_code == ui::DomCode::DEL && |
[email protected] | 3c8cfbe7 | 2012-07-03 00:24:15 | [diff] [blame] | 154 | CheckCtrlAndAltArePressed(pressed_keys_)) { |
[email protected] | 97328ee | 2013-06-04 06:46:59 | [diff] [blame] | 155 | VLOG(3) << "Sending Secure Attention Sequence to the session"; |
joedow | 7da9460 | 2016-06-07 00:18:04 | [diff] [blame] | 156 | execute_action_task_runner_->PostTask(FROM_HERE, inject_sas_); |
joedow | 83eff38 | 2016-04-29 16:51:14 | [diff] [blame] | 157 | } else if (dom_code == ui::DomCode::US_L && |
| 158 | IsWinKeyPressed(pressed_keys_)) { |
| 159 | execute_action_task_runner_->PostTask(FROM_HERE, lock_workstation_); |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 160 | } |
[email protected] | 3ac30fdc | 2012-04-06 07:41:21 | [diff] [blame] | 161 | |
jamiewalch | aadc22f | 2015-10-12 23:25:50 | [diff] [blame] | 162 | pressed_keys_.insert(dom_code); |
[email protected] | 3ac30fdc | 2012-04-06 07:41:21 | [diff] [blame] | 163 | } else { |
jamiewalch | aadc22f | 2015-10-12 23:25:50 | [diff] [blame] | 164 | pressed_keys_.erase(dom_code); |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 165 | } |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 166 | } |
| 167 | |
[email protected] | 5ae4da1 | 2012-03-17 20:03:57 | [diff] [blame] | 168 | SwitchToInputDesktop(); |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 169 | nested_executor_->InjectKeyEvent(event); |
| 170 | } |
| 171 | |
[email protected] | 529bbd1 | 2014-03-27 20:25:39 | [diff] [blame] | 172 | void SessionInputInjectorWin::Core::InjectTextEvent(const TextEvent& event) { |
| 173 | if (!input_task_runner_->BelongsToCurrentThread()) { |
| 174 | input_task_runner_->PostTask( |
kylechar | 2caf4d6 | 2019-02-15 20:03:42 | [diff] [blame] | 175 | FROM_HERE, base::BindOnce(&Core::InjectTextEvent, this, event)); |
[email protected] | 529bbd1 | 2014-03-27 20:25:39 | [diff] [blame] | 176 | return; |
| 177 | } |
| 178 | |
| 179 | SwitchToInputDesktop(); |
| 180 | nested_executor_->InjectTextEvent(event); |
| 181 | } |
| 182 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 183 | void SessionInputInjectorWin::Core::InjectMouseEvent(const MouseEvent& event) { |
[email protected] | e8f8dcee | 2012-11-02 00:16:05 | [diff] [blame] | 184 | if (!input_task_runner_->BelongsToCurrentThread()) { |
| 185 | input_task_runner_->PostTask( |
kylechar | 2caf4d6 | 2019-02-15 20:03:42 | [diff] [blame] | 186 | FROM_HERE, base::BindOnce(&Core::InjectMouseEvent, this, event)); |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 187 | return; |
| 188 | } |
| 189 | |
[email protected] | 5ae4da1 | 2012-03-17 20:03:57 | [diff] [blame] | 190 | SwitchToInputDesktop(); |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 191 | nested_executor_->InjectMouseEvent(event); |
| 192 | } |
| 193 | |
rkuroiwa | 0e68803f | 2015-02-26 19:41:42 | [diff] [blame] | 194 | void SessionInputInjectorWin::Core::InjectTouchEvent(const TouchEvent& event) { |
rkuroiwa | 883da7e | 2015-03-25 05:22:12 | [diff] [blame] | 195 | if (!input_task_runner_->BelongsToCurrentThread()) { |
| 196 | input_task_runner_->PostTask( |
kylechar | 2caf4d6 | 2019-02-15 20:03:42 | [diff] [blame] | 197 | FROM_HERE, base::BindOnce(&Core::InjectTouchEvent, this, event)); |
rkuroiwa | 883da7e | 2015-03-25 05:22:12 | [diff] [blame] | 198 | return; |
| 199 | } |
| 200 | |
| 201 | SwitchToInputDesktop(); |
| 202 | nested_executor_->InjectTouchEvent(event); |
rkuroiwa | 0e68803f | 2015-02-26 19:41:42 | [diff] [blame] | 203 | } |
| 204 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 205 | SessionInputInjectorWin::Core::~Core() { |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 206 | } |
| 207 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 208 | void SessionInputInjectorWin::Core::SwitchToInputDesktop() { |
[email protected] | 5ae4da1 | 2012-03-17 20:03:57 | [diff] [blame] | 209 | // Switch to the desktop receiving user input if different from the current |
| 210 | // one. |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 211 | std::unique_ptr<webrtc::Desktop> input_desktop( |
[email protected] | 3aef722 | 2013-06-07 22:39:50 | [diff] [blame] | 212 | webrtc::Desktop::GetInputDesktop()); |
sergeyu | c5f104b | 2015-01-09 19:33:24 | [diff] [blame] | 213 | if (input_desktop.get() != nullptr && !desktop_.IsSame(*input_desktop)) { |
[email protected] | 5ae4da1 | 2012-03-17 20:03:57 | [diff] [blame] | 214 | // If SetThreadDesktop() fails, the thread is still assigned a desktop. |
| 215 | // So we can continue capture screen bits, just from a diffected desktop. |
[email protected] | 3aef722 | 2013-06-07 22:39:50 | [diff] [blame] | 216 | desktop_.SetThreadDesktop(input_desktop.release()); |
[email protected] | 5ae4da1 | 2012-03-17 20:03:57 | [diff] [blame] | 217 | } |
| 218 | } |
| 219 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 220 | SessionInputInjectorWin::SessionInputInjectorWin( |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 221 | scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 222 | std::unique_ptr<InputInjector> nested_executor, |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 223 | scoped_refptr<base::SingleThreadTaskRunner> inject_sas_task_runner, |
Evan Stade | af37ba3 | 2020-06-26 20:36:37 | [diff] [blame] | 224 | const base::RepeatingClosure& inject_sas, |
| 225 | const base::RepeatingClosure& lock_workstation) { |
sergeyu | 1417e013 | 2015-12-23 19:01:22 | [diff] [blame] | 226 | core_ = new Core(input_task_runner, std::move(nested_executor), |
joedow | 83eff38 | 2016-04-29 16:51:14 | [diff] [blame] | 227 | inject_sas_task_runner, inject_sas, lock_workstation); |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 228 | } |
| 229 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 230 | SessionInputInjectorWin::~SessionInputInjectorWin() { |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 231 | } |
| 232 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 233 | void SessionInputInjectorWin::Start( |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 234 | std::unique_ptr<protocol::ClipboardStub> client_clipboard) { |
sergeyu | 1417e013 | 2015-12-23 19:01:22 | [diff] [blame] | 235 | core_->Start(std::move(client_clipboard)); |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 236 | } |
| 237 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 238 | void SessionInputInjectorWin::InjectClipboardEvent( |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 239 | const protocol::ClipboardEvent& event) { |
| 240 | core_->InjectClipboardEvent(event); |
| 241 | } |
| 242 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 243 | void SessionInputInjectorWin::InjectKeyEvent(const protocol::KeyEvent& event) { |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 244 | core_->InjectKeyEvent(event); |
| 245 | } |
| 246 | |
[email protected] | 529bbd1 | 2014-03-27 20:25:39 | [diff] [blame] | 247 | void SessionInputInjectorWin::InjectTextEvent( |
| 248 | const protocol::TextEvent& event) { |
| 249 | core_->InjectTextEvent(event); |
| 250 | } |
| 251 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 252 | void SessionInputInjectorWin::InjectMouseEvent( |
[email protected] | 764b6f4 | 2012-11-06 03:25:25 | [diff] [blame] | 253 | const protocol::MouseEvent& event) { |
| 254 | core_->InjectMouseEvent(event); |
| 255 | } |
| 256 | |
rkuroiwa | 0e68803f | 2015-02-26 19:41:42 | [diff] [blame] | 257 | void SessionInputInjectorWin::InjectTouchEvent( |
| 258 | const protocol::TouchEvent& event) { |
| 259 | core_->InjectTouchEvent(event); |
| 260 | } |
| 261 | |
[email protected] | c2b37440 | 2012-03-12 19:23:07 | [diff] [blame] | 262 | } // namespace remoting |