| 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/input_injector.h" | 20 #include "remoting/host/input_injector.h" |
| 20 #include "remoting/host/screen_controls.h" | 21 #include "remoting/host/screen_controls.h" |
| 21 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" | 22 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" |
| 22 | 23 |
| 23 namespace remoting { | 24 namespace remoting { |
| 24 | 25 |
| 25 IpcDesktopEnvironment::IpcDesktopEnvironment( | 26 IpcDesktopEnvironment::IpcDesktopEnvironment( |
| 26 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, | 27 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, |
| 27 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 28 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 28 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, | 29 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 } | 63 } |
| 63 | 64 |
| 64 std::string IpcDesktopEnvironment::GetCapabilities() const { | 65 std::string IpcDesktopEnvironment::GetCapabilities() const { |
| 65 return desktop_session_proxy_->GetCapabilities(); | 66 return desktop_session_proxy_->GetCapabilities(); |
| 66 } | 67 } |
| 67 | 68 |
| 68 void IpcDesktopEnvironment::SetCapabilities(const std::string& capabilities) { | 69 void IpcDesktopEnvironment::SetCapabilities(const std::string& capabilities) { |
| 69 return desktop_session_proxy_->SetCapabilities(capabilities); | 70 return desktop_session_proxy_->SetCapabilities(capabilities); |
| 70 } | 71 } |
| 71 | 72 |
| 73 scoped_ptr<GnubbyAuthHandler> IpcDesktopEnvironment::CreateGnubbyAuthHandler( |
| 74 protocol::ClientStub* client_stub) { |
| 75 return scoped_ptr<GnubbyAuthHandler>(); |
| 76 } |
| 77 |
| 72 IpcDesktopEnvironmentFactory::IpcDesktopEnvironmentFactory( | 78 IpcDesktopEnvironmentFactory::IpcDesktopEnvironmentFactory( |
| 73 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, | 79 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, |
| 74 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 80 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 75 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, | 81 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, |
| 76 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, | 82 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
| 77 IPC::Sender* daemon_channel) | 83 IPC::Sender* daemon_channel) |
| 78 : audio_task_runner_(audio_task_runner), | 84 : audio_task_runner_(audio_task_runner), |
| 79 caller_task_runner_(caller_task_runner), | 85 caller_task_runner_(caller_task_runner), |
| 80 capture_task_runner_(capture_task_runner), | 86 capture_task_runner_(capture_task_runner), |
| 81 io_task_runner_(io_task_runner), | 87 io_task_runner_(io_task_runner), |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 if (i != active_connections_.end()) { | 211 if (i != active_connections_.end()) { |
| 206 DesktopSessionProxy* desktop_session_proxy = i->second; | 212 DesktopSessionProxy* desktop_session_proxy = i->second; |
| 207 active_connections_.erase(i); | 213 active_connections_.erase(i); |
| 208 | 214 |
| 209 // Disconnect the client session. | 215 // Disconnect the client session. |
| 210 desktop_session_proxy->DisconnectSession(); | 216 desktop_session_proxy->DisconnectSession(); |
| 211 } | 217 } |
| 212 } | 218 } |
| 213 | 219 |
| 214 } // namespace remoting | 220 } // namespace remoting |
| OLD | NEW |