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 the Windows service controlling Me2Me host processes | 5 // This file implements the Windows service controlling Me2Me host processes |
6 // running within user sessions. | 6 // running within user sessions. |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "remoting/base/auto_thread.h" | 14 #include "remoting/base/auto_thread.h" |
15 #include "remoting/base/auto_thread_task_runner.h" | 15 #include "remoting/base/auto_thread_task_runner.h" |
16 #include "remoting/host/desktop_process.h" | 16 #include "remoting/host/desktop_process.h" |
17 #include "remoting/host/host_exit_codes.h" | 17 #include "remoting/host/host_exit_codes.h" |
18 #include "remoting/host/host_main.h" | 18 #include "remoting/host/host_main.h" |
19 #include "remoting/host/ipc_constants.h" | 19 #include "remoting/host/ipc_constants.h" |
20 #include "remoting/host/me2me_desktop_environment.h" | 20 #include "remoting/host/me2me_desktop_environment.h" |
21 #include "remoting/host/win/session_desktop_environment.h" | 21 #include "remoting/host/win/session_desktop_environment.h" |
22 | 22 |
23 namespace remoting { | 23 namespace remoting { |
24 | 24 |
25 int DesktopProcessMain() { | 25 int DesktopProcessMain() { |
26 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 26 const base::CommandLine* command_line = |
| 27 base::CommandLine::ForCurrentProcess(); |
27 std::string channel_name = | 28 std::string channel_name = |
28 command_line->GetSwitchValueASCII(kDaemonPipeSwitchName); | 29 command_line->GetSwitchValueASCII(kDaemonPipeSwitchName); |
29 | 30 |
30 if (channel_name.empty()) | 31 if (channel_name.empty()) |
31 return kUsageExitCode; | 32 return kUsageExitCode; |
32 | 33 |
33 base::MessageLoopForUI message_loop; | 34 base::MessageLoopForUI message_loop; |
34 base::RunLoop run_loop; | 35 base::RunLoop run_loop; |
35 scoped_refptr<AutoThreadTaskRunner> ui_task_runner = | 36 scoped_refptr<AutoThreadTaskRunner> ui_task_runner = |
36 new AutoThreadTaskRunner(message_loop.message_loop_proxy(), | 37 new AutoThreadTaskRunner(message_loop.message_loop_proxy(), |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 return kSuccessExitCode; | 73 return kSuccessExitCode; |
73 } | 74 } |
74 | 75 |
75 } // namespace remoting | 76 } // namespace remoting |
76 | 77 |
77 #if !defined(OS_WIN) | 78 #if !defined(OS_WIN) |
78 int main(int argc, char** argv) { | 79 int main(int argc, char** argv) { |
79 return remoting::HostMain(argc, argv); | 80 return remoting::HostMain(argc, argv); |
80 } | 81 } |
81 #endif // !defined(OS_WIN) | 82 #endif // !defined(OS_WIN) |
OLD | NEW |