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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 #include "remoting/host/json_host_config.h" | 61 #include "remoting/host/json_host_config.h" |
62 #include "remoting/host/logging.h" | 62 #include "remoting/host/logging.h" |
63 #include "remoting/host/me2me_desktop_environment.h" | 63 #include "remoting/host/me2me_desktop_environment.h" |
64 #include "remoting/host/pairing_registry_delegate.h" | 64 #include "remoting/host/pairing_registry_delegate.h" |
65 #include "remoting/host/policy_hack/policy_watcher.h" | 65 #include "remoting/host/policy_hack/policy_watcher.h" |
66 #include "remoting/host/session_manager_factory.h" | 66 #include "remoting/host/session_manager_factory.h" |
67 #include "remoting/host/signaling_connector.h" | 67 #include "remoting/host/signaling_connector.h" |
68 #include "remoting/host/token_validator_factory_impl.h" | 68 #include "remoting/host/token_validator_factory_impl.h" |
69 #include "remoting/host/usage_stats_consent.h" | 69 #include "remoting/host/usage_stats_consent.h" |
70 #include "remoting/host/username.h" | 70 #include "remoting/host/username.h" |
71 #include "remoting/jingle_glue/network_settings.h" | |
72 #include "remoting/jingle_glue/xmpp_signal_strategy.h" | |
73 #include "remoting/protocol/me2me_host_authenticator_factory.h" | 71 #include "remoting/protocol/me2me_host_authenticator_factory.h" |
| 72 #include "remoting/protocol/network_settings.h" |
74 #include "remoting/protocol/pairing_registry.h" | 73 #include "remoting/protocol/pairing_registry.h" |
75 #include "remoting/protocol/token_validator.h" | 74 #include "remoting/protocol/token_validator.h" |
| 75 #include "remoting/signaling/xmpp_signal_strategy.h" |
76 | 76 |
77 #if defined(OS_POSIX) | 77 #if defined(OS_POSIX) |
78 #include <signal.h> | 78 #include <signal.h> |
79 #include <sys/types.h> | 79 #include <sys/types.h> |
80 #include <unistd.h> | 80 #include <unistd.h> |
81 #include "base/file_descriptor_posix.h" | 81 #include "base/file_descriptor_posix.h" |
82 #include "remoting/host/pam_authorization_factory_posix.h" | 82 #include "remoting/host/pam_authorization_factory_posix.h" |
83 #include "remoting/host/posix/signal_handler.h" | 83 #include "remoting/host/posix/signal_handler.h" |
84 #endif // defined(OS_POSIX) | 84 #endif // defined(OS_POSIX) |
85 | 85 |
86 #if defined(OS_MACOSX) | 86 #if defined(OS_MACOSX) |
87 #include "base/mac/scoped_cftyperef.h" | 87 #include "base/mac/scoped_cftyperef.h" |
88 #endif // defined(OS_MACOSX) | 88 #endif // defined(OS_MACOSX) |
89 | 89 |
90 #if defined(OS_LINUX) | 90 #if defined(OS_LINUX) |
91 #include <gtk/gtk.h> | 91 #include <gtk/gtk.h> |
92 #include "remoting/host/audio_capturer_linux.h" | 92 #include "remoting/host/audio_capturer_linux.h" |
93 #endif // defined(OS_LINUX) | 93 #endif // defined(OS_LINUX) |
94 | 94 |
95 #if defined(OS_WIN) | 95 #if defined(OS_WIN) |
96 #include <commctrl.h> | 96 #include <commctrl.h> |
97 #include "base/win/registry.h" | 97 #include "base/win/registry.h" |
98 #include "base/win/scoped_handle.h" | 98 #include "base/win/scoped_handle.h" |
99 #include "remoting/host/pairing_registry_delegate_win.h" | 99 #include "remoting/host/pairing_registry_delegate_win.h" |
100 #include "remoting/host/win/session_desktop_environment.h" | 100 #include "remoting/host/win/session_desktop_environment.h" |
101 #endif // defined(OS_WIN) | 101 #endif // defined(OS_WIN) |
| 102 |
102 using remoting::protocol::PairingRegistry; | 103 using remoting::protocol::PairingRegistry; |
| 104 using remoting::protocol::NetworkSettings; |
103 | 105 |
104 namespace { | 106 namespace { |
105 | 107 |
106 // This is used for tagging system event logs. | 108 // This is used for tagging system event logs. |
107 const char kApplicationName[] = "chromoting"; | 109 const char kApplicationName[] = "chromoting"; |
108 | 110 |
109 #if defined(OS_LINUX) | 111 #if defined(OS_LINUX) |
110 // The command line switch used to pass name of the pipe to capture audio on | 112 // The command line switch used to pass name of the pipe to capture audio on |
111 // linux. | 113 // linux. |
112 const char kAudioPipeSwitchName[] = "audio-pipe-name"; | 114 const char kAudioPipeSwitchName[] = "audio-pipe-name"; |
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1369 int exit_code = kSuccessExitCode; | 1371 int exit_code = kSuccessExitCode; |
1370 new HostProcess(context.Pass(), &exit_code); | 1372 new HostProcess(context.Pass(), &exit_code); |
1371 | 1373 |
1372 // Run the main (also UI) message loop until the host no longer needs it. | 1374 // Run the main (also UI) message loop until the host no longer needs it. |
1373 message_loop.Run(); | 1375 message_loop.Run(); |
1374 | 1376 |
1375 return exit_code; | 1377 return exit_code; |
1376 } | 1378 } |
1377 | 1379 |
1378 } // namespace remoting | 1380 } // namespace remoting |
OLD | NEW |