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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 #include "remoting/host/pam_authorization_factory_posix.h" | 84 #include "remoting/host/pam_authorization_factory_posix.h" |
85 #include "remoting/host/posix/signal_handler.h" | 85 #include "remoting/host/posix/signal_handler.h" |
86 #endif // defined(OS_POSIX) | 86 #endif // defined(OS_POSIX) |
87 | 87 |
88 #if defined(OS_MACOSX) | 88 #if defined(OS_MACOSX) |
89 #include "base/mac/scoped_cftyperef.h" | 89 #include "base/mac/scoped_cftyperef.h" |
90 #endif // defined(OS_MACOSX) | 90 #endif // defined(OS_MACOSX) |
91 | 91 |
92 #if defined(OS_LINUX) | 92 #if defined(OS_LINUX) |
93 #include <gtk/gtk.h> | 93 #include <gtk/gtk.h> |
| 94 #include <X11/Xlib.h> |
94 #include "remoting/host/audio_capturer_linux.h" | 95 #include "remoting/host/audio_capturer_linux.h" |
95 #endif // defined(OS_LINUX) | 96 #endif // defined(OS_LINUX) |
96 | 97 |
97 #if defined(OS_WIN) | 98 #if defined(OS_WIN) |
98 #include <commctrl.h> | 99 #include <commctrl.h> |
99 #include "base/win/registry.h" | 100 #include "base/win/registry.h" |
100 #include "base/win/scoped_handle.h" | 101 #include "base/win/scoped_handle.h" |
101 #include "remoting/host/pairing_registry_delegate_win.h" | 102 #include "remoting/host/pairing_registry_delegate_win.h" |
102 #include "remoting/host/win/session_desktop_environment.h" | 103 #include "remoting/host/win/session_desktop_environment.h" |
103 #endif // defined(OS_WIN) | 104 #endif // defined(OS_WIN) |
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1410 "Requested by %s at %s, line %d.", | 1411 "Requested by %s at %s, line %d.", |
1411 function_name.c_str(), file_name.c_str(), line_number); | 1412 function_name.c_str(), file_name.c_str(), line_number); |
1412 base::debug::Alias(message); | 1413 base::debug::Alias(message); |
1413 | 1414 |
1414 // The daemon requested us to crash the process. | 1415 // The daemon requested us to crash the process. |
1415 CHECK(false) << message; | 1416 CHECK(false) << message; |
1416 } | 1417 } |
1417 | 1418 |
1418 int HostProcessMain() { | 1419 int HostProcessMain() { |
1419 #if defined(OS_LINUX) | 1420 #if defined(OS_LINUX) |
| 1421 // Required in order for us to run multiple X11 threads. |
| 1422 XInitThreads(); |
| 1423 |
1420 // Required for any calls into GTK functions, such as the Disconnect and | 1424 // Required for any calls into GTK functions, such as the Disconnect and |
1421 // Continue windows, though these should not be used for the Me2Me case | 1425 // Continue windows, though these should not be used for the Me2Me case |
1422 // (crbug.com/104377). | 1426 // (crbug.com/104377). |
1423 gtk_init(NULL, NULL); | 1427 gtk_init(NULL, NULL); |
1424 #endif | 1428 #endif |
1425 | 1429 |
1426 // Enable support for SSL server sockets, which must be done while still | 1430 // Enable support for SSL server sockets, which must be done while still |
1427 // single-threaded. | 1431 // single-threaded. |
1428 net::EnableSSLServerSockets(); | 1432 net::EnableSSLServerSockets(); |
1429 | 1433 |
(...skipping 14 matching lines...) Expand all Loading... |
1444 int exit_code = kSuccessExitCode; | 1448 int exit_code = kSuccessExitCode; |
1445 new HostProcess(context.Pass(), &exit_code); | 1449 new HostProcess(context.Pass(), &exit_code); |
1446 | 1450 |
1447 // Run the main (also UI) message loop until the host no longer needs it. | 1451 // Run the main (also UI) message loop until the host no longer needs it. |
1448 message_loop.Run(); | 1452 message_loop.Run(); |
1449 | 1453 |
1450 return exit_code; | 1454 return exit_code; |
1451 } | 1455 } |
1452 | 1456 |
1453 } // namespace remoting | 1457 } // namespace remoting |
OLD | NEW |