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" |
| 6 |
| 7 #if defined(OS_WIN) |
| 8 #include "app/win_util.h" |
| 9 #endif |
5 #include "base/command_line.h" | 10 #include "base/command_line.h" |
6 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
7 #include "base/string_util.h" | 12 #include "base/string_util.h" |
8 #include "base/system_monitor.h" | 13 #include "base/system_monitor.h" |
9 #include "build/build_config.h" | 14 #include "build/build_config.h" |
10 #include "chrome/common/child_process.h" | 15 #include "chrome/common/child_process.h" |
11 #include "chrome/common/chrome_constants.h" | 16 #include "chrome/common/chrome_constants.h" |
12 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
13 #include "chrome/common/logging_chrome.h" | 18 #include "chrome/common/logging_chrome.h" |
14 #include "chrome/common/main_function_params.h" | 19 #include "chrome/common/main_function_params.h" |
15 #include "chrome/plugin/plugin_thread.h" | 20 #include "chrome/plugin/plugin_thread.h" |
16 | 21 |
17 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
18 #include "chrome/common/win_util.h" | |
19 #include "chrome/test/injection_test_dll.h" | 23 #include "chrome/test/injection_test_dll.h" |
20 #include "sandbox/src/sandbox.h" | 24 #include "sandbox/src/sandbox.h" |
21 #endif | 25 #endif |
22 | 26 |
23 // main() routine for running as the plugin process. | 27 // main() routine for running as the plugin process. |
24 int PluginMain(const MainFunctionParams& parameters) { | 28 int PluginMain(const MainFunctionParams& parameters) { |
25 // The main thread of the plugin services IO. | 29 // The main thread of the plugin services IO. |
26 MessageLoopForIO main_message_loop; | 30 MessageLoopForIO main_message_loop; |
27 std::wstring app_name = chrome::kBrowserAppName; | 31 std::wstring app_name = chrome::kBrowserAppName; |
28 PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); | 32 PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 92 |
89 MessageLoop::current()->Run(); | 93 MessageLoop::current()->Run(); |
90 } | 94 } |
91 | 95 |
92 #if defined(OS_WIN) | 96 #if defined(OS_WIN) |
93 CoUninitialize(); | 97 CoUninitialize(); |
94 #endif | 98 #endif |
95 | 99 |
96 return 0; | 100 return 0; |
97 } | 101 } |
OLD | NEW |