| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // Register and initialize common controls. | 71 // Register and initialize common controls. |
| 72 INITCOMMONCONTROLSEX info; | 72 INITCOMMONCONTROLSEX info; |
| 73 info.dwSize = sizeof(info); | 73 info.dwSize = sizeof(info); |
| 74 info.dwICC = ICC_STANDARD_CLASSES; | 74 info.dwICC = ICC_STANDARD_CLASSES; |
| 75 InitCommonControlsEx(&info); | 75 InitCommonControlsEx(&info); |
| 76 #endif // defined(OS_WIN) | 76 #endif // defined(OS_WIN) |
| 77 | 77 |
| 78 // Required to find the ICU data file, used by some file_util routines. | 78 // Required to find the ICU data file, used by some file_util routines. |
| 79 base::i18n::InitializeICU(); | 79 base::i18n::InitializeICU(); |
| 80 | 80 |
| 81 base::TaskScheduler::CreateAndSetSimpleTaskScheduler("It2Me"); | 81 base::TaskScheduler::CreateAndStartWithDefaultParams("It2Me"); |
| 82 | 82 |
| 83 remoting::LoadResources(""); | 83 remoting::LoadResources(""); |
| 84 | 84 |
| 85 #if defined(OS_LINUX) | 85 #if defined(OS_LINUX) |
| 86 // Required in order for us to run multiple X11 threads. | 86 // Required in order for us to run multiple X11 threads. |
| 87 XInitThreads(); | 87 XInitThreads(); |
| 88 | 88 |
| 89 // Required for any calls into GTK functions, such as the Disconnect and | 89 // Required for any calls into GTK functions, such as the Disconnect and |
| 90 // Continue windows. Calling with nullptr arguments because we don't have | 90 // Continue windows. Calling with nullptr arguments because we don't have |
| 91 // any command line arguments for gtk to consume. | 91 // any command line arguments for gtk to consume. |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // Run the loop until channel is alive. | 197 // Run the loop until channel is alive. |
| 198 run_loop.Run(); | 198 run_loop.Run(); |
| 199 | 199 |
| 200 // Block until tasks blocking shutdown have completed their execution. | 200 // Block until tasks blocking shutdown have completed their execution. |
| 201 base::TaskScheduler::GetInstance()->Shutdown(); | 201 base::TaskScheduler::GetInstance()->Shutdown(); |
| 202 | 202 |
| 203 return kSuccessExitCode; | 203 return kSuccessExitCode; |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace remoting | 206 } // namespace remoting |
| OLD | NEW |