OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/win/session_input_injector.h" | 5 #include "remoting/host/win/session_input_injector.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 } | 190 } |
191 | 191 |
192 SessionInputInjectorWin::Core::~Core() { | 192 SessionInputInjectorWin::Core::~Core() { |
193 } | 193 } |
194 | 194 |
195 void SessionInputInjectorWin::Core::SwitchToInputDesktop() { | 195 void SessionInputInjectorWin::Core::SwitchToInputDesktop() { |
196 // Switch to the desktop receiving user input if different from the current | 196 // Switch to the desktop receiving user input if different from the current |
197 // one. | 197 // one. |
198 scoped_ptr<webrtc::Desktop> input_desktop( | 198 scoped_ptr<webrtc::Desktop> input_desktop( |
199 webrtc::Desktop::GetInputDesktop()); | 199 webrtc::Desktop::GetInputDesktop()); |
200 if (input_desktop.get() != NULL && !desktop_.IsSame(*input_desktop)) { | 200 if (input_desktop.get() != nullptr && !desktop_.IsSame(*input_desktop)) { |
201 // If SetThreadDesktop() fails, the thread is still assigned a desktop. | 201 // If SetThreadDesktop() fails, the thread is still assigned a desktop. |
202 // So we can continue capture screen bits, just from a diffected desktop. | 202 // So we can continue capture screen bits, just from a diffected desktop. |
203 desktop_.SetThreadDesktop(input_desktop.release()); | 203 desktop_.SetThreadDesktop(input_desktop.release()); |
204 } | 204 } |
205 } | 205 } |
206 | 206 |
207 SessionInputInjectorWin::SessionInputInjectorWin( | 207 SessionInputInjectorWin::SessionInputInjectorWin( |
208 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 208 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
209 scoped_ptr<InputInjector> nested_executor, | 209 scoped_ptr<InputInjector> nested_executor, |
210 scoped_refptr<base::SingleThreadTaskRunner> inject_sas_task_runner, | 210 scoped_refptr<base::SingleThreadTaskRunner> inject_sas_task_runner, |
(...skipping 23 matching lines...) Expand all Loading... |
234 const protocol::TextEvent& event) { | 234 const protocol::TextEvent& event) { |
235 core_->InjectTextEvent(event); | 235 core_->InjectTextEvent(event); |
236 } | 236 } |
237 | 237 |
238 void SessionInputInjectorWin::InjectMouseEvent( | 238 void SessionInputInjectorWin::InjectMouseEvent( |
239 const protocol::MouseEvent& event) { | 239 const protocol::MouseEvent& event) { |
240 core_->InjectMouseEvent(event); | 240 core_->InjectMouseEvent(event); |
241 } | 241 } |
242 | 242 |
243 } // namespace remoting | 243 } // namespace remoting |
OLD | NEW |