OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <objbase.h> | 8 #include <objbase.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 #endif | 92 #endif |
93 MessageLoop main_message_loop(MessageLoop::TYPE_UI); | 93 MessageLoop main_message_loop(MessageLoop::TYPE_UI); |
94 PlatformThread::SetName("CrPluginMain"); | 94 PlatformThread::SetName("CrPluginMain"); |
95 | 95 |
96 SystemMonitor system_monitor; | 96 SystemMonitor system_monitor; |
97 HighResolutionTimerManager high_resolution_timer_manager; | 97 HighResolutionTimerManager high_resolution_timer_manager; |
98 | 98 |
99 const CommandLine& parsed_command_line = parameters.command_line_; | 99 const CommandLine& parsed_command_line = parameters.command_line_; |
100 | 100 |
101 #if defined(OS_LINUX) | 101 #if defined(OS_LINUX) |
102 // On Linux we exec ourselves from /proc/self/exe, but that makes the | |
103 // process name that shows up in "ps" etc. for plugins show as "exe" | |
104 // instead of "chrome" or something reasonable. Try to fix it. | |
105 CommandLine::SetProcTitle(); | |
106 | 102 |
107 #if defined(ARCH_CPU_64_BITS) | 103 #if defined(ARCH_CPU_64_BITS) |
108 WorkaroundFlashLAHF(); | 104 WorkaroundFlashLAHF(); |
109 #endif | 105 #endif |
110 | 106 |
111 #elif defined(OS_WIN) | 107 #elif defined(OS_WIN) |
112 sandbox::TargetServices* target_services = | 108 sandbox::TargetServices* target_services = |
113 parameters.sandbox_info_.TargetServices(); | 109 parameters.sandbox_info_.TargetServices(); |
114 | 110 |
115 CoInitialize(NULL); | 111 CoInitialize(NULL); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 169 |
174 MessageLoop::current()->Run(); | 170 MessageLoop::current()->Run(); |
175 } | 171 } |
176 | 172 |
177 #if defined(OS_WIN) | 173 #if defined(OS_WIN) |
178 CoUninitialize(); | 174 CoUninitialize(); |
179 #endif | 175 #endif |
180 | 176 |
181 return 0; | 177 return 0; |
182 } | 178 } |
OLD | NEW |