OLD | NEW |
1 // Copyright (c) 2009-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009-2010 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include "app/win_util.h" | 8 #include <windows.h> |
9 #include "chrome/test/injection_test_dll.h" | |
10 #include "sandbox/src/sandbox.h" | |
11 #endif | 9 #endif |
12 | 10 |
13 #include "app/hi_res_timer_manager.h" | 11 #include "app/hi_res_timer_manager.h" |
14 #include "app/system_monitor.h" | 12 #include "app/system_monitor.h" |
15 #include "base/command_line.h" | 13 #include "base/command_line.h" |
16 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
17 #include "base/string_util.h" | 15 #include "base/string_util.h" |
18 #include "chrome/common/child_process.h" | 16 #include "chrome/common/child_process.h" |
19 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
20 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
21 #include "chrome/common/logging_chrome.h" | 19 #include "chrome/common/logging_chrome.h" |
22 #include "chrome/common/main_function_params.h" | 20 #include "chrome/common/main_function_params.h" |
23 #include "chrome/common/result_codes.h" | 21 #include "chrome/common/result_codes.h" |
24 #include "chrome/common/sandbox_policy.h" | 22 #include "chrome/common/sandbox_policy.h" |
25 #if defined(OS_WIN) | |
26 #include "chrome/nacl/broker_thread.h" | |
27 #endif | |
28 #include "chrome/nacl/nacl_main_platform_delegate.h" | 23 #include "chrome/nacl/nacl_main_platform_delegate.h" |
29 #include "chrome/nacl/nacl_thread.h" | 24 #include "chrome/nacl/nacl_thread.h" |
30 | 25 |
| 26 #if defined(OS_WIN) |
| 27 #include "chrome/nacl/broker_thread.h" |
| 28 #include "chrome/test/injection_test_dll.h" |
| 29 #include "sandbox/src/sandbox.h" |
| 30 #endif |
| 31 |
31 #ifdef _WIN64 | 32 #ifdef _WIN64 |
32 | 33 |
33 // main() routine for the NaCl broker process. | 34 // main() routine for the NaCl broker process. |
34 // This is necessary for supporting NaCl in Chrome on Win64. | 35 // This is necessary for supporting NaCl in Chrome on Win64. |
35 int NaClBrokerMain(const MainFunctionParams& parameters) { | 36 int NaClBrokerMain(const MainFunctionParams& parameters) { |
36 // The main thread of the broker. | 37 // The main thread of the broker. |
37 MessageLoopForIO main_message_loop; | 38 MessageLoopForIO main_message_loop; |
38 PlatformThread::SetName("CrNaClBrokerMain"); | 39 PlatformThread::SetName("CrNaClBrokerMain"); |
39 | 40 |
40 SystemMonitor system_monitor; | 41 SystemMonitor system_monitor; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 125 |
125 LaunchNaClChildProcess(); | 126 LaunchNaClChildProcess(); |
126 | 127 |
127 #else | 128 #else |
128 NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc."; | 129 NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc."; |
129 #endif | 130 #endif |
130 | 131 |
131 platform.PlatformUninitialize(); | 132 platform.PlatformUninitialize(); |
132 return 0; | 133 return 0; |
133 } | 134 } |
134 | |
135 | |
OLD | NEW |