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 // This file implements a standalone host process for Me2Me. | 5 // This file implements a standalone host process for Me2Me. |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 | 296 |
297 HostProcess::HostProcess(scoped_ptr<ChromotingHostContext> context, | 297 HostProcess::HostProcess(scoped_ptr<ChromotingHostContext> context, |
298 int* exit_code_out) | 298 int* exit_code_out) |
299 : context_(context.Pass()), | 299 : context_(context.Pass()), |
300 state_(HOST_INITIALIZING), | 300 state_(HOST_INITIALIZING), |
301 allow_nat_traversal_(true), | 301 allow_nat_traversal_(true), |
302 curtain_required_(false), | 302 curtain_required_(false), |
303 #if defined(REMOTING_MULTI_PROCESS) | 303 #if defined(REMOTING_MULTI_PROCESS) |
304 desktop_session_connector_(NULL), | 304 desktop_session_connector_(NULL), |
305 #endif // defined(REMOTING_MULTI_PROCESS) | 305 #endif // defined(REMOTING_MULTI_PROCESS) |
306 ALLOW_THIS_IN_INITIALIZER_LIST(self_(this)), | 306 self_(this), |
307 exit_code_out_(exit_code_out) { | 307 exit_code_out_(exit_code_out) { |
308 // Create the platform-specific curtain-mode implementation. | 308 // Create the platform-specific curtain-mode implementation. |
309 // TODO(wez): Create this on the network thread? | 309 // TODO(wez): Create this on the network thread? |
310 curtain_ = CurtainMode::Create( | 310 curtain_ = CurtainMode::Create( |
311 base::Bind(&HostProcess::OnRemoteSessionSwitchedToConsole, | 311 base::Bind(&HostProcess::OnRemoteSessionSwitchedToConsole, |
312 base::Unretained(this)), | 312 base::Unretained(this)), |
313 base::Bind(&HostProcess::OnCurtainModeFailed, | 313 base::Bind(&HostProcess::OnCurtainModeFailed, |
314 base::Unretained(this))); | 314 base::Unretained(this))); |
315 | 315 |
316 StartOnUiThread(); | 316 StartOnUiThread(); |
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 return exit_code; | 1155 return exit_code; |
1156 } | 1156 } |
1157 | 1157 |
1158 } // namespace remoting | 1158 } // namespace remoting |
1159 | 1159 |
1160 #if !defined(OS_WIN) | 1160 #if !defined(OS_WIN) |
1161 int main(int argc, char** argv) { | 1161 int main(int argc, char** argv) { |
1162 return remoting::HostMain(argc, argv); | 1162 return remoting::HostMain(argc, argv); |
1163 } | 1163 } |
1164 #endif // !defined(OS_WIN) | 1164 #endif // !defined(OS_WIN) |
OLD | NEW |