| 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/it2me/it2me_native_messaging_host_main.h" | 5 #include "remoting/host/it2me/it2me_native_messaging_host_main.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/i18n/icu_util.h" | 9 #include "base/i18n/icu_util.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 12 #include "media/base/media.h" | 12 #include "media/base/media.h" |
| 13 #include "net/socket/ssl_server_socket.h" | 13 #include "net/socket/ssl_server_socket.h" |
| 14 #include "remoting/base/breakpad.h" | 14 #include "remoting/base/breakpad.h" |
| 15 #include "remoting/base/resources.h" | 15 #include "remoting/base/resources.h" |
| 16 #include "remoting/host/host_exit_codes.h" | 16 #include "remoting/host/host_exit_codes.h" |
| 17 #include "remoting/host/it2me/it2me_native_messaging_host.h" | 17 #include "remoting/host/it2me/it2me_native_messaging_host.h" |
| 18 #include "remoting/host/logging.h" | 18 #include "remoting/host/logging.h" |
| 19 #include "remoting/host/usage_stats_consent.h" | 19 #include "remoting/host/usage_stats_consent.h" |
| 20 | 20 |
| 21 #if defined(OS_LINUX) | 21 #if defined(OS_LINUX) |
| 22 #include <gtk/gtk.h> | 22 #include <gtk/gtk.h> |
| 23 #include <X11/Xlib.h> |
| 23 #endif // defined(OS_LINUX) | 24 #endif // defined(OS_LINUX) |
| 24 | 25 |
| 25 #if defined(OS_MACOSX) | 26 #if defined(OS_MACOSX) |
| 26 #include "base/mac/scoped_nsautorelease_pool.h" | 27 #include "base/mac/scoped_nsautorelease_pool.h" |
| 27 #endif // defined(OS_MACOSX) | 28 #endif // defined(OS_MACOSX) |
| 28 | 29 |
| 29 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
| 30 #include <commctrl.h> | 31 #include <commctrl.h> |
| 31 #endif // defined(OS_WIN) | 32 #endif // defined(OS_WIN) |
| 32 | 33 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 57 InitCommonControlsEx(&info); | 58 InitCommonControlsEx(&info); |
| 58 #endif // defined(OS_WIN) | 59 #endif // defined(OS_WIN) |
| 59 | 60 |
| 60 // Required to find the ICU data file, used by some file_util routines. | 61 // Required to find the ICU data file, used by some file_util routines. |
| 61 base::i18n::InitializeICU(); | 62 base::i18n::InitializeICU(); |
| 62 | 63 |
| 63 remoting::LoadResources(""); | 64 remoting::LoadResources(""); |
| 64 | 65 |
| 65 // Cannot use TOOLKIT_GTK because it is not defined when aura is enabled. | 66 // Cannot use TOOLKIT_GTK because it is not defined when aura is enabled. |
| 66 #if defined(OS_LINUX) | 67 #if defined(OS_LINUX) |
| 68 // Required in order for us to run multiple X11 threads. |
| 69 XInitThreads(); |
| 70 |
| 67 // Required for any calls into GTK functions, such as the Disconnect and | 71 // Required for any calls into GTK functions, such as the Disconnect and |
| 68 // Continue windows. Calling with NULL arguments because we don't have | 72 // Continue windows. Calling with NULL arguments because we don't have |
| 69 // any command line arguments for gtk to consume. | 73 // any command line arguments for gtk to consume. |
| 70 gtk_init(NULL, NULL); | 74 gtk_init(NULL, NULL); |
| 71 #endif // OS_LINUX | 75 #endif // OS_LINUX |
| 72 | 76 |
| 73 // Enable support for SSL server sockets, which must be done while still | 77 // Enable support for SSL server sockets, which must be done while still |
| 74 // single-threaded. | 78 // single-threaded. |
| 75 net::EnableSSLServerSockets(); | 79 net::EnableSSLServerSockets(); |
| 76 | 80 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // This object instance is required by Chrome code (such as MessageLoop). | 135 // This object instance is required by Chrome code (such as MessageLoop). |
| 132 base::AtExitManager exit_manager; | 136 base::AtExitManager exit_manager; |
| 133 | 137 |
| 134 base::CommandLine::Init(argc, argv); | 138 base::CommandLine::Init(argc, argv); |
| 135 remoting::InitHostLogging(); | 139 remoting::InitHostLogging(); |
| 136 | 140 |
| 137 return StartIt2MeNativeMessagingHost(); | 141 return StartIt2MeNativeMessagingHost(); |
| 138 } | 142 } |
| 139 | 143 |
| 140 } // namespace remoting | 144 } // namespace remoting |
| OLD | NEW |