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/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/process_util.h" | 12 #include "base/process_util.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "ipc/ipc_channel_proxy.h" | 14 #include "ipc/ipc_sender.h" |
15 #include "media/video/capture/screen/screen_capturer.h" | 15 #include "media/video/capture/screen/screen_capturer.h" |
16 #include "remoting/host/audio_capturer.h" | 16 #include "remoting/host/audio_capturer.h" |
17 #include "remoting/host/chromoting_messages.h" | 17 #include "remoting/host/chromoting_messages.h" |
18 #include "remoting/host/desktop_session_proxy.h" | 18 #include "remoting/host/desktop_session_proxy.h" |
19 #include "remoting/host/event_executor.h" | 19 #include "remoting/host/event_executor.h" |
20 | 20 |
21 namespace remoting { | 21 namespace remoting { |
22 | 22 |
23 IpcDesktopEnvironment::IpcDesktopEnvironment( | 23 IpcDesktopEnvironment::IpcDesktopEnvironment( |
24 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 24 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 if (!connected_) { | 77 if (!connected_) { |
78 connected_ = true; | 78 connected_ = true; |
79 desktop_session_connector_->ConnectTerminal(desktop_session_proxy_); | 79 desktop_session_connector_->ConnectTerminal(desktop_session_proxy_); |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 IpcDesktopEnvironmentFactory::IpcDesktopEnvironmentFactory( | 83 IpcDesktopEnvironmentFactory::IpcDesktopEnvironmentFactory( |
84 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 84 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
85 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, | 85 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
86 IPC::ChannelProxy* daemon_channel) | 86 IPC::Sender* daemon_channel) |
87 : caller_task_runner_(caller_task_runner), | 87 : caller_task_runner_(caller_task_runner), |
88 io_task_runner_(io_task_runner), | 88 io_task_runner_(io_task_runner), |
89 daemon_channel_(daemon_channel), | 89 daemon_channel_(daemon_channel), |
90 connector_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 90 connector_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
91 next_id_(0) { | 91 next_id_(0) { |
92 } | 92 } |
93 | 93 |
94 IpcDesktopEnvironmentFactory::~IpcDesktopEnvironmentFactory() { | 94 IpcDesktopEnvironmentFactory::~IpcDesktopEnvironmentFactory() { |
95 } | 95 } |
96 | 96 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 if (i != active_connections_.end()) { | 180 if (i != active_connections_.end()) { |
181 scoped_refptr<DesktopSessionProxy> desktop_session_proxy = i->second; | 181 scoped_refptr<DesktopSessionProxy> desktop_session_proxy = i->second; |
182 active_connections_.erase(i); | 182 active_connections_.erase(i); |
183 | 183 |
184 // Disconnect the client session. | 184 // Disconnect the client session. |
185 desktop_session_proxy->DisconnectSession(); | 185 desktop_session_proxy->DisconnectSession(); |
186 } | 186 } |
187 } | 187 } |
188 | 188 |
189 } // namespace remoting | 189 } // namespace remoting |
OLD | NEW |