| 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" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 namespace remoting { | 24 namespace remoting { |
| 25 | 25 |
| 26 int DesktopProcessMain() { | 26 int DesktopProcessMain() { |
| 27 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 27 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 28 std::string channel_name = | 28 std::string channel_name = |
| 29 command_line->GetSwitchValueASCII(kDaemonPipeSwitchName); | 29 command_line->GetSwitchValueASCII(kDaemonPipeSwitchName); |
| 30 | 30 |
| 31 if (channel_name.empty()) | 31 if (channel_name.empty()) |
| 32 return kUsageExitCode; | 32 return kUsageExitCode; |
| 33 | 33 |
| 34 MessageLoop message_loop(MessageLoop::TYPE_UI); | 34 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); |
| 35 base::RunLoop run_loop; | 35 base::RunLoop run_loop; |
| 36 scoped_refptr<AutoThreadTaskRunner> ui_task_runner = | 36 scoped_refptr<AutoThreadTaskRunner> ui_task_runner = |
| 37 new AutoThreadTaskRunner(message_loop.message_loop_proxy(), | 37 new AutoThreadTaskRunner(message_loop.message_loop_proxy(), |
| 38 run_loop.QuitClosure()); | 38 run_loop.QuitClosure()); |
| 39 | 39 |
| 40 // Launch the input thread. | 40 // Launch the input thread. |
| 41 scoped_refptr<AutoThreadTaskRunner> input_task_runner = | 41 scoped_refptr<AutoThreadTaskRunner> input_task_runner = |
| 42 AutoThread::CreateWithType("Input thread", ui_task_runner, | 42 AutoThread::CreateWithType( |
| 43 MessageLoop::TYPE_IO); | 43 "Input thread", ui_task_runner, base::MessageLoop::TYPE_IO); |
| 44 | 44 |
| 45 DesktopProcess desktop_process(ui_task_runner, | 45 DesktopProcess desktop_process(ui_task_runner, |
| 46 input_task_runner, | 46 input_task_runner, |
| 47 channel_name); | 47 channel_name); |
| 48 | 48 |
| 49 // TODO(alexeypa): Localize the UI strings. See http://crbug.com/155204. | 49 // TODO(alexeypa): Localize the UI strings. See http://crbug.com/155204. |
| 50 UiStrings ui_string; | 50 UiStrings ui_string; |
| 51 | 51 |
| 52 // Create a platform-dependent environment factory. | 52 // Create a platform-dependent environment factory. |
| 53 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory; | 53 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 78 return kSuccessExitCode; | 78 return kSuccessExitCode; |
| 79 } | 79 } |
| 80 | 80 |
| 81 } // namespace remoting | 81 } // namespace remoting |
| 82 | 82 |
| 83 #if !defined(OS_WIN) | 83 #if !defined(OS_WIN) |
| 84 int main(int argc, char** argv) { | 84 int main(int argc, char** argv) { |
| 85 return remoting::HostMain(argc, argv); | 85 return remoting::HostMain(argc, argv); |
| 86 } | 86 } |
| 87 #endif // !defined(OS_WIN) | 87 #endif // !defined(OS_WIN) |
| OLD | NEW |