| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 } | 160 } |
| 161 | 161 |
| 162 DaemonProcess::DaemonProcess( | 162 DaemonProcess::DaemonProcess( |
| 163 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, | 163 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, |
| 164 scoped_refptr<AutoThreadTaskRunner> io_task_runner, | 164 scoped_refptr<AutoThreadTaskRunner> io_task_runner, |
| 165 const base::Closure& stopped_callback) | 165 const base::Closure& stopped_callback) |
| 166 : Stoppable(caller_task_runner, stopped_callback), | 166 : Stoppable(caller_task_runner, stopped_callback), |
| 167 caller_task_runner_(caller_task_runner), | 167 caller_task_runner_(caller_task_runner), |
| 168 io_task_runner_(io_task_runner), | 168 io_task_runner_(io_task_runner), |
| 169 next_terminal_id_(0), | 169 next_terminal_id_(0), |
| 170 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { | 170 weak_factory_(this) { |
| 171 DCHECK(caller_task_runner->BelongsToCurrentThread()); | 171 DCHECK(caller_task_runner->BelongsToCurrentThread()); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void DaemonProcess::CreateDesktopSession(int terminal_id, | 174 void DaemonProcess::CreateDesktopSession(int terminal_id, |
| 175 const ScreenResolution& resolution, | 175 const ScreenResolution& resolution, |
| 176 bool virtual_terminal) { | 176 bool virtual_terminal) { |
| 177 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 177 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 178 | 178 |
| 179 // Validate the supplied terminal ID. An attempt to create a desktop session | 179 // Validate the supplied terminal ID. An attempt to create a desktop session |
| 180 // with an ID that could possibly have been allocated already is considered | 180 // with an ID that could possibly have been allocated already is considered |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 } | 372 } |
| 373 | 373 |
| 374 void DaemonProcess::DeleteAllDesktopSessions() { | 374 void DaemonProcess::DeleteAllDesktopSessions() { |
| 375 while (!desktop_sessions_.empty()) { | 375 while (!desktop_sessions_.empty()) { |
| 376 delete desktop_sessions_.front(); | 376 delete desktop_sessions_.front(); |
| 377 desktop_sessions_.pop_front(); | 377 desktop_sessions_.pop_front(); |
| 378 } | 378 } |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace remoting | 381 } // namespace remoting |
| OLD | NEW |