| 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/ipc_desktop_environment.h" | 5 #include "remoting/host/ipc_desktop_environment.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/process/process_handle.h" | 11 #include "base/process/process_handle.h" |
| 12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 13 #include "ipc/ipc_sender.h" | 13 #include "ipc/ipc_sender.h" |
| 14 #include "remoting/host/audio_capturer.h" | 14 #include "remoting/host/audio_capturer.h" |
| 15 #include "remoting/host/chromoting_messages.h" | 15 #include "remoting/host/chromoting_messages.h" |
| 16 #include "remoting/host/client_session_control.h" | 16 #include "remoting/host/client_session_control.h" |
| 17 #include "remoting/host/desktop_session.h" | 17 #include "remoting/host/desktop_session.h" |
| 18 #include "remoting/host/desktop_session_proxy.h" | 18 #include "remoting/host/desktop_session_proxy.h" |
| 19 #include "remoting/host/gnubby_auth_handler.h" | 19 #include "remoting/host/gnubby_auth_handler.h" |
| 20 #include "remoting/host/input_injector.h" | 20 #include "remoting/host/input_injector.h" |
| 21 #include "remoting/host/screen_controls.h" | 21 #include "remoting/host/screen_controls.h" |
| 22 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h" |
| 22 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" | 23 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" |
| 23 | 24 |
| 24 namespace remoting { | 25 namespace remoting { |
| 25 | 26 |
| 26 IpcDesktopEnvironment::IpcDesktopEnvironment( | 27 IpcDesktopEnvironment::IpcDesktopEnvironment( |
| 27 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, | 28 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, |
| 28 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 29 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 29 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, | 30 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, |
| 30 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, | 31 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
| 31 base::WeakPtr<ClientSessionControl> client_session_control, | 32 base::WeakPtr<ClientSessionControl> client_session_control, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 50 } | 51 } |
| 51 | 52 |
| 52 scoped_ptr<InputInjector> IpcDesktopEnvironment::CreateInputInjector() { | 53 scoped_ptr<InputInjector> IpcDesktopEnvironment::CreateInputInjector() { |
| 53 return desktop_session_proxy_->CreateInputInjector(); | 54 return desktop_session_proxy_->CreateInputInjector(); |
| 54 } | 55 } |
| 55 | 56 |
| 56 scoped_ptr<ScreenControls> IpcDesktopEnvironment::CreateScreenControls() { | 57 scoped_ptr<ScreenControls> IpcDesktopEnvironment::CreateScreenControls() { |
| 57 return desktop_session_proxy_->CreateScreenControls(); | 58 return desktop_session_proxy_->CreateScreenControls(); |
| 58 } | 59 } |
| 59 | 60 |
| 61 scoped_ptr<webrtc::MouseCursorMonitor> |
| 62 IpcDesktopEnvironment::CreateMouseCursorMonitor() { |
| 63 return desktop_session_proxy_->CreateMouseCursorMonitor(); |
| 64 } |
| 65 |
| 60 scoped_ptr<webrtc::ScreenCapturer> | 66 scoped_ptr<webrtc::ScreenCapturer> |
| 61 IpcDesktopEnvironment::CreateVideoCapturer() { | 67 IpcDesktopEnvironment::CreateVideoCapturer() { |
| 62 return desktop_session_proxy_->CreateVideoCapturer(); | 68 return desktop_session_proxy_->CreateVideoCapturer(); |
| 63 } | 69 } |
| 64 | 70 |
| 65 std::string IpcDesktopEnvironment::GetCapabilities() const { | 71 std::string IpcDesktopEnvironment::GetCapabilities() const { |
| 66 return desktop_session_proxy_->GetCapabilities(); | 72 return desktop_session_proxy_->GetCapabilities(); |
| 67 } | 73 } |
| 68 | 74 |
| 69 void IpcDesktopEnvironment::SetCapabilities(const std::string& capabilities) { | 75 void IpcDesktopEnvironment::SetCapabilities(const std::string& capabilities) { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 if (i != active_connections_.end()) { | 216 if (i != active_connections_.end()) { |
| 211 DesktopSessionProxy* desktop_session_proxy = i->second; | 217 DesktopSessionProxy* desktop_session_proxy = i->second; |
| 212 active_connections_.erase(i); | 218 active_connections_.erase(i); |
| 213 | 219 |
| 214 // Disconnect the client session. | 220 // Disconnect the client session. |
| 215 desktop_session_proxy->DisconnectSession(); | 221 desktop_session_proxy->DisconnectSession(); |
| 216 } | 222 } |
| 217 } | 223 } |
| 218 | 224 |
| 219 } // namespace remoting | 225 } // namespace remoting |
| OLD | NEW |