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 #include "app/hi_res_timer_manager.h" | 7 #include "app/hi_res_timer_manager.h" |
8 #include "app/system_monitor.h" | 8 #include "app/system_monitor.h" |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include "app/win_util.h" | 10 #include "app/win_util.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #endif | 53 #endif |
54 | 54 |
55 // The main thread of the plugin services UI. | 55 // The main thread of the plugin services UI. |
56 #if defined(OS_MACOSX) | 56 #if defined(OS_MACOSX) |
57 #if !defined(__LP64__) | 57 #if !defined(__LP64__) |
58 TrimInterposeEnvironment(); | 58 TrimInterposeEnvironment(); |
59 #endif | 59 #endif |
60 InitializeChromeApplication(); | 60 InitializeChromeApplication(); |
61 #endif | 61 #endif |
62 MessageLoop main_message_loop(MessageLoop::TYPE_UI); | 62 MessageLoop main_message_loop(MessageLoop::TYPE_UI); |
63 std::wstring app_name = chrome::kBrowserAppName; | 63 PlatformThread::SetName("CrPluginMain"); |
64 PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); | |
65 | 64 |
66 SystemMonitor system_monitor; | 65 SystemMonitor system_monitor; |
67 HighResolutionTimerManager high_resolution_timer_manager; | 66 HighResolutionTimerManager high_resolution_timer_manager; |
68 | 67 |
69 const CommandLine& parsed_command_line = parameters.command_line_; | 68 const CommandLine& parsed_command_line = parameters.command_line_; |
70 | 69 |
71 #if defined(OS_LINUX) | 70 #if defined(OS_LINUX) |
72 // On Linux we exec ourselves from /proc/self/exe, but that makes the | 71 // On Linux we exec ourselves from /proc/self/exe, but that makes the |
73 // process name that shows up in "ps" etc. for plugins show as "exe" | 72 // process name that shows up in "ps" etc. for plugins show as "exe" |
74 // instead of "chrome" or something reasonable. Try to fix it. | 73 // instead of "chrome" or something reasonable. Try to fix it. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 133 |
135 MessageLoop::current()->Run(); | 134 MessageLoop::current()->Run(); |
136 } | 135 } |
137 | 136 |
138 #if defined(OS_WIN) | 137 #if defined(OS_WIN) |
139 CoUninitialize(); | 138 CoUninitialize(); |
140 #endif | 139 #endif |
141 | 140 |
142 return 0; | 141 return 0; |
143 } | 142 } |
OLD | NEW |