OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "app/win_util.h" |
9 #endif | 9 #endif |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/system_monitor.h" | 13 #include "base/system_monitor.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "chrome/common/child_process.h" | 15 #include "chrome/common/child_process.h" |
16 #include "chrome/common/chrome_constants.h" | 16 #include "chrome/common/chrome_constants.h" |
17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/common/logging_chrome.h" | 18 #include "chrome/common/logging_chrome.h" |
19 #include "chrome/common/main_function_params.h" | 19 #include "chrome/common/main_function_params.h" |
20 #include "chrome/plugin/plugin_thread.h" | 20 #include "chrome/plugin/plugin_thread.h" |
21 | 21 |
22 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
23 #include "chrome/test/injection_test_dll.h" | 23 #include "chrome/test/injection_test_dll.h" |
24 #include "sandbox/src/sandbox.h" | 24 #include "sandbox/src/sandbox.h" |
25 #elif defined(OS_LINUX) | 25 #elif defined(OS_LINUX) |
26 #include "chrome/common/chrome_descriptors.h" | |
27 #include "base/global_descriptors_posix.h" | 26 #include "base/global_descriptors_posix.h" |
| 27 #include "ipc/ipc_descriptors.h" |
28 #endif | 28 #endif |
29 | 29 |
30 // main() routine for running as the plugin process. | 30 // main() routine for running as the plugin process. |
31 int PluginMain(const MainFunctionParams& parameters) { | 31 int PluginMain(const MainFunctionParams& parameters) { |
32 // The main thread of the plugin services IO. | 32 // The main thread of the plugin services IO. |
33 MessageLoopForIO main_message_loop; | 33 MessageLoopForIO main_message_loop; |
34 std::wstring app_name = chrome::kBrowserAppName; | 34 std::wstring app_name = chrome::kBrowserAppName; |
35 PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); | 35 PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); |
36 | 36 |
37 // Initialize the SystemMonitor | 37 // Initialize the SystemMonitor |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 MessageLoop::current()->Run(); | 105 MessageLoop::current()->Run(); |
106 } | 106 } |
107 | 107 |
108 #if defined(OS_WIN) | 108 #if defined(OS_WIN) |
109 CoUninitialize(); | 109 CoUninitialize(); |
110 #endif | 110 #endif |
111 | 111 |
112 return 0; | 112 return 0; |
113 } | 113 } |
OLD | NEW |