OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/at_exit.h" |
| 6 #include "base/command_line.h" |
| 7 #include "base/logging.h" |
| 8 #include "remoting/host/resources.h" |
| 9 #include "remoting/proto/event.pb.h" |
| 10 #include "remoting/test/it2me_standalone_host.h" |
| 11 |
| 12 #if defined(OS_LINUX) |
| 13 #include <gtk/gtk.h> |
| 14 #include <X11/Xlib.h> |
| 15 |
| 16 #include "base/linux_util.h" |
| 17 #endif // defined(OS_LINUX) |
| 18 |
| 19 int main(int argc, const char** argv) { |
| 20 base::AtExitManager at_exit_manager; |
| 21 base::CommandLine::Init(argc, argv); |
| 22 remoting::test::It2MeStandaloneHost host; |
| 23 |
| 24 #if defined(OS_LINUX) |
| 25 // Required in order for us to run multiple X11 threads. |
| 26 XInitThreads(); |
| 27 |
| 28 // Required for any calls into GTK functions, such as the Disconnect and |
| 29 // Continue windows. Calling with nullptr arguments because we don't have |
| 30 // any command line arguments for gtk to consume. |
| 31 gtk_init(nullptr, nullptr); |
| 32 |
| 33 // Need to prime the host OS version value for linux to prevent IO on the |
| 34 // network thread. base::GetLinuxDistro() caches the result. |
| 35 base::GetLinuxDistro(); |
| 36 #endif // OS_LINUX |
| 37 remoting::LoadResources(""); |
| 38 host.StartOutputTimer(); |
| 39 host.Run(); |
| 40 } |
OLD | NEW |