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/daemon_process.h" | 5 #include "remoting/host/daemon_process.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/callback_helpers.h" | 12 #include "base/callback_helpers.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "base/files/file_util.h" | 15 #include "base/files/file_util.h" |
16 #include "base/location.h" | 16 #include "base/location.h" |
17 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
18 #include "ipc/attachment_broker_privileged.h" | |
18 #include "net/base/net_util.h" | 19 #include "net/base/net_util.h" |
19 #include "remoting/base/auto_thread_task_runner.h" | 20 #include "remoting/base/auto_thread_task_runner.h" |
20 #include "remoting/host/branding.h" | 21 #include "remoting/host/branding.h" |
21 #include "remoting/host/chromoting_messages.h" | 22 #include "remoting/host/chromoting_messages.h" |
22 #include "remoting/host/config_file_watcher.h" | 23 #include "remoting/host/config_file_watcher.h" |
23 #include "remoting/host/desktop_session.h" | 24 #include "remoting/host/desktop_session.h" |
24 #include "remoting/host/host_event_logger.h" | 25 #include "remoting/host/host_event_logger.h" |
25 #include "remoting/host/host_exit_codes.h" | 26 #include "remoting/host/host_exit_codes.h" |
26 #include "remoting/host/host_status_observer.h" | 27 #include "remoting/host/host_status_observer.h" |
27 #include "remoting/host/screen_resolution.h" | 28 #include "remoting/host/screen_resolution.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
176 DaemonProcess::DaemonProcess( | 177 DaemonProcess::DaemonProcess( |
177 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, | 178 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, |
178 scoped_refptr<AutoThreadTaskRunner> io_task_runner, | 179 scoped_refptr<AutoThreadTaskRunner> io_task_runner, |
179 const base::Closure& stopped_callback) | 180 const base::Closure& stopped_callback) |
180 : caller_task_runner_(caller_task_runner), | 181 : caller_task_runner_(caller_task_runner), |
181 io_task_runner_(io_task_runner), | 182 io_task_runner_(io_task_runner), |
182 next_terminal_id_(0), | 183 next_terminal_id_(0), |
183 stopped_callback_(stopped_callback), | 184 stopped_callback_(stopped_callback), |
184 weak_factory_(this) { | 185 weak_factory_(this) { |
185 DCHECK(caller_task_runner->BelongsToCurrentThread()); | 186 DCHECK(caller_task_runner->BelongsToCurrentThread()); |
187 | |
188 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(); | |
joedow
2016/01/26 21:42:51
It looks like this method has different args for O
erikchen
2016/01/26 21:47:00
Oh, yes. The Chrome browser process, on Mac, has a
Sergey Ulanov
2016/01/27 01:38:39
There are some files like this one that are compil
Sergey Ulanov
2016/01/27 01:43:02
We are not using this code on OSX.
Updated this c
erikchen
2016/01/27 15:16:41
If this code isn't being used on OSX, why is it be
Sergey Ulanov
2016/01/27 18:29:12
The goal is to implement multi-process host on OSX
| |
186 } | 189 } |
187 | 190 |
188 void DaemonProcess::CreateDesktopSession(int terminal_id, | 191 void DaemonProcess::CreateDesktopSession(int terminal_id, |
189 const ScreenResolution& resolution, | 192 const ScreenResolution& resolution, |
190 bool virtual_terminal) { | 193 bool virtual_terminal) { |
191 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 194 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
192 | 195 |
193 // Validate the supplied terminal ID. An attempt to create a desktop session | 196 // Validate the supplied terminal ID. An attempt to create a desktop session |
194 // with an ID that could possibly have been allocated already is considered | 197 // with an ID that could possibly have been allocated already is considered |
195 // a protocol error and the network process will be restarted. | 198 // a protocol error and the network process will be restarted. |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
373 } | 376 } |
374 | 377 |
375 void DaemonProcess::DeleteAllDesktopSessions() { | 378 void DaemonProcess::DeleteAllDesktopSessions() { |
376 while (!desktop_sessions_.empty()) { | 379 while (!desktop_sessions_.empty()) { |
377 delete desktop_sessions_.front(); | 380 delete desktop_sessions_.front(); |
378 desktop_sessions_.pop_front(); | 381 desktop_sessions_.pop_front(); |
379 } | 382 } |
380 } | 383 } |
381 | 384 |
382 } // namespace remoting | 385 } // namespace remoting |
OLD | NEW |