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" |
(...skipping 18 matching lines...) Expand all Loading... |
29 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, | 29 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
30 base::WeakPtr<ClientSessionControl> client_session_control, | 30 base::WeakPtr<ClientSessionControl> client_session_control, |
31 base::WeakPtr<DesktopSessionConnector> desktop_session_connector, | 31 base::WeakPtr<DesktopSessionConnector> desktop_session_connector, |
32 bool virtual_terminal) { | 32 bool virtual_terminal) { |
33 DCHECK(caller_task_runner->BelongsToCurrentThread()); | 33 DCHECK(caller_task_runner->BelongsToCurrentThread()); |
34 | 34 |
35 desktop_session_proxy_ = new DesktopSessionProxy(audio_task_runner, | 35 desktop_session_proxy_ = new DesktopSessionProxy(audio_task_runner, |
36 caller_task_runner, | 36 caller_task_runner, |
37 io_task_runner, | 37 io_task_runner, |
38 capture_task_runner, | 38 capture_task_runner, |
39 client_session_control); | 39 client_session_control, |
40 | 40 desktop_session_connector, |
41 desktop_session_proxy_->ConnectToDesktopSession(desktop_session_connector, | 41 virtual_terminal); |
42 virtual_terminal); | |
43 } | 42 } |
44 | 43 |
45 IpcDesktopEnvironment::~IpcDesktopEnvironment() { | 44 IpcDesktopEnvironment::~IpcDesktopEnvironment() { |
46 } | 45 } |
47 | 46 |
48 scoped_ptr<AudioCapturer> IpcDesktopEnvironment::CreateAudioCapturer() { | 47 scoped_ptr<AudioCapturer> IpcDesktopEnvironment::CreateAudioCapturer() { |
49 return desktop_session_proxy_->CreateAudioCapturer(); | 48 return desktop_session_proxy_->CreateAudioCapturer(); |
50 } | 49 } |
51 | 50 |
52 scoped_ptr<InputInjector> IpcDesktopEnvironment::CreateInputInjector() { | 51 scoped_ptr<InputInjector> IpcDesktopEnvironment::CreateInputInjector() { |
53 return desktop_session_proxy_->CreateInputInjector(); | 52 return desktop_session_proxy_->CreateInputInjector(); |
54 } | 53 } |
55 | 54 |
56 scoped_ptr<ScreenControls> IpcDesktopEnvironment::CreateScreenControls() { | 55 scoped_ptr<ScreenControls> IpcDesktopEnvironment::CreateScreenControls() { |
57 return desktop_session_proxy_->CreateScreenControls(); | 56 return desktop_session_proxy_->CreateScreenControls(); |
58 } | 57 } |
59 | 58 |
60 scoped_ptr<media::ScreenCapturer> IpcDesktopEnvironment::CreateVideoCapturer() { | 59 scoped_ptr<media::ScreenCapturer> IpcDesktopEnvironment::CreateVideoCapturer() { |
61 return desktop_session_proxy_->CreateVideoCapturer(); | 60 return desktop_session_proxy_->CreateVideoCapturer(); |
62 } | 61 } |
63 | 62 |
| 63 std::string IpcDesktopEnvironment::GetCapabilities() const { |
| 64 return desktop_session_proxy_->GetCapabilities(); |
| 65 } |
| 66 |
| 67 void IpcDesktopEnvironment::SetCapabilities(const std::string& capabilities) { |
| 68 return desktop_session_proxy_->SetCapabilities(capabilities); |
| 69 } |
| 70 |
64 IpcDesktopEnvironmentFactory::IpcDesktopEnvironmentFactory( | 71 IpcDesktopEnvironmentFactory::IpcDesktopEnvironmentFactory( |
65 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, | 72 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, |
66 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 73 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
67 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, | 74 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, |
68 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, | 75 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
69 IPC::Sender* daemon_channel) | 76 IPC::Sender* daemon_channel) |
70 : audio_task_runner_(audio_task_runner), | 77 : audio_task_runner_(audio_task_runner), |
71 caller_task_runner_(caller_task_runner), | 78 caller_task_runner_(caller_task_runner), |
72 capture_task_runner_(capture_task_runner), | 79 capture_task_runner_(capture_task_runner), |
73 io_task_runner_(io_task_runner), | 80 io_task_runner_(io_task_runner), |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 if (i != active_connections_.end()) { | 204 if (i != active_connections_.end()) { |
198 DesktopSessionProxy* desktop_session_proxy = i->second; | 205 DesktopSessionProxy* desktop_session_proxy = i->second; |
199 active_connections_.erase(i); | 206 active_connections_.erase(i); |
200 | 207 |
201 // Disconnect the client session. | 208 // Disconnect the client session. |
202 desktop_session_proxy->DisconnectSession(); | 209 desktop_session_proxy->DisconnectSession(); |
203 } | 210 } |
204 } | 211 } |
205 | 212 |
206 } // namespace remoting | 213 } // namespace remoting |
OLD | NEW |