| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/setup/native_messaging_host.h" | 5 #include "remoting/host/setup/native_messaging_host.h" |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 base::PlatformFile write_file = GetStdHandle(STD_OUTPUT_HANDLE); | 26 base::PlatformFile write_file = GetStdHandle(STD_OUTPUT_HANDLE); |
| 27 #elif defined(OS_POSIX) | 27 #elif defined(OS_POSIX) |
| 28 base::PlatformFile read_file = STDIN_FILENO; | 28 base::PlatformFile read_file = STDIN_FILENO; |
| 29 base::PlatformFile write_file = STDOUT_FILENO; | 29 base::PlatformFile write_file = STDOUT_FILENO; |
| 30 #else | 30 #else |
| 31 #error Not implemented. | 31 #error Not implemented. |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); | 34 base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); |
| 35 base::RunLoop run_loop; | 35 base::RunLoop run_loop; |
| 36 remoting::NativeMessagingHost host(read_file, write_file, | 36 remoting::NativeMessagingHost host(remoting::DaemonController::Create(), |
| 37 read_file, write_file, |
| 37 message_loop.message_loop_proxy(), | 38 message_loop.message_loop_proxy(), |
| 38 run_loop.QuitClosure()); | 39 run_loop.QuitClosure()); |
| 39 host.Start(); | 40 host.Start(); |
| 40 run_loop.Run(); | 41 run_loop.Run(); |
| 41 return 0; | 42 return 0; |
| 42 } | 43 } |
| OLD | NEW |