| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <objbase.h> | 8 #include <objbase.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #endif | 10 #endif |
| 11 | 11 |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 15 #include "base/system_monitor/system_monitor.h" | 15 #include "base/system_monitor/system_monitor.h" |
| 16 #include "base/threading/platform_thread.h" | |
| 17 #include "content/common/child_process.h" | 16 #include "content/common/child_process.h" |
| 18 #include "content/common/content_switches.h" | 17 #include "content/common/content_switches.h" |
| 19 #include "content/common/hi_res_timer_manager.h" | 18 #include "content/common/hi_res_timer_manager.h" |
| 20 #include "content/common/main_function_params.h" | 19 #include "content/common/main_function_params.h" |
| 21 #include "content/plugin/plugin_thread.h" | 20 #include "content/plugin/plugin_thread.h" |
| 22 | 21 |
| 23 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
| 24 #include "content/common/injection_test_dll.h" | 23 #include "content/common/injection_test_dll.h" |
| 25 #include "sandbox/src/sandbox.h" | 24 #include "sandbox/src/sandbox.h" |
| 26 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 25 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 75 |
| 77 // main() routine for running as the plugin process. | 76 // main() routine for running as the plugin process. |
| 78 int PluginMain(const MainFunctionParams& parameters) { | 77 int PluginMain(const MainFunctionParams& parameters) { |
| 79 // The main thread of the plugin services UI. | 78 // The main thread of the plugin services UI. |
| 80 #if defined(OS_MACOSX) | 79 #if defined(OS_MACOSX) |
| 81 #if !defined(__LP64__) | 80 #if !defined(__LP64__) |
| 82 TrimInterposeEnvironment(); | 81 TrimInterposeEnvironment(); |
| 83 #endif | 82 #endif |
| 84 InitializeChromeApplication(); | 83 InitializeChromeApplication(); |
| 85 #endif | 84 #endif |
| 86 MessageLoop main_message_loop(MessageLoop::TYPE_UI); | 85 MessageLoop main_message_loop("CrPluginMain", MessageLoop::TYPE_UI); |
| 87 base::PlatformThread::SetName("CrPluginMain"); | |
| 88 | 86 |
| 89 base::SystemMonitor system_monitor; | 87 base::SystemMonitor system_monitor; |
| 90 HighResolutionTimerManager high_resolution_timer_manager; | 88 HighResolutionTimerManager high_resolution_timer_manager; |
| 91 | 89 |
| 92 const CommandLine& parsed_command_line = parameters.command_line_; | 90 const CommandLine& parsed_command_line = parameters.command_line_; |
| 93 | 91 |
| 94 #if defined(OS_LINUX) | 92 #if defined(OS_LINUX) |
| 95 | 93 |
| 96 #if defined(ARCH_CPU_64_BITS) | 94 #if defined(ARCH_CPU_64_BITS) |
| 97 WorkaroundFlashLAHF(); | 95 WorkaroundFlashLAHF(); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 160 |
| 163 MessageLoop::current()->Run(); | 161 MessageLoop::current()->Run(); |
| 164 } | 162 } |
| 165 | 163 |
| 166 #if defined(OS_WIN) | 164 #if defined(OS_WIN) |
| 167 CoUninitialize(); | 165 CoUninitialize(); |
| 168 #endif | 166 #endif |
| 169 | 167 |
| 170 return 0; | 168 return 0; |
| 171 } | 169 } |
| OLD | NEW |