| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #include "app/app_switches.h" | 7 #include "app/app_switches.h" |
| 8 #include "app/gfx/gl/gl_context.h" | 8 #include "app/gfx/gl/gl_context.h" |
| 9 #include "app/gfx/gl/gl_implementation.h" | 9 #include "app/gfx/gl/gl_implementation.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 // Main function for starting the Gpu process. | 58 // Main function for starting the Gpu process. |
| 59 int GpuMain(const MainFunctionParams& parameters) { | 59 int GpuMain(const MainFunctionParams& parameters) { |
| 60 base::Time start_time = base::Time::Now(); | 60 base::Time start_time = base::Time::Now(); |
| 61 | 61 |
| 62 #if defined(USE_LINUX_BREAKPAD) | 62 #if defined(USE_LINUX_BREAKPAD) |
| 63 // Needs to be called after we have chrome::DIR_USER_DATA. | 63 // Needs to be called after we have chrome::DIR_USER_DATA. |
| 64 InitCrashReporter(); | 64 InitCrashReporter(); |
| 65 #endif | 65 #endif |
| 66 | 66 |
| 67 #if defined(OS_LINUX) | |
| 68 // On Linux we exec ourselves from /proc/self/exe, but that makes the | |
| 69 // process name that shows up in "ps" etc. for the GPU process show as | |
| 70 // "exe" instead of "chrome" or something reasonable. Try to fix it. | |
| 71 CommandLine::SetProcTitle(); | |
| 72 #endif | |
| 73 | |
| 74 const CommandLine& command_line = parameters.command_line_; | 67 const CommandLine& command_line = parameters.command_line_; |
| 75 if (command_line.HasSwitch(switches::kGpuStartupDialog)) { | 68 if (command_line.HasSwitch(switches::kGpuStartupDialog)) { |
| 76 ChildProcess::WaitForDebugger(L"Gpu"); | 69 ChildProcess::WaitForDebugger(L"Gpu"); |
| 77 } | 70 } |
| 78 | 71 |
| 79 #if defined(OS_MACOSX) | 72 #if defined(OS_MACOSX) |
| 80 chrome_application_mac::RegisterCrApp(); | 73 chrome_application_mac::RegisterCrApp(); |
| 81 #endif | 74 #endif |
| 82 | 75 |
| 83 MessageLoop main_message_loop(MessageLoop::TYPE_UI); | 76 MessageLoop main_message_loop(MessageLoop::TYPE_UI); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 watchdog_thread->Start(); | 149 watchdog_thread->Start(); |
| 157 } | 150 } |
| 158 | 151 |
| 159 main_message_loop.Run(); | 152 main_message_loop.Run(); |
| 160 | 153 |
| 161 if (enable_watchdog) | 154 if (enable_watchdog) |
| 162 watchdog_thread->Stop(); | 155 watchdog_thread->Stop(); |
| 163 | 156 |
| 164 return 0; | 157 return 0; |
| 165 } | 158 } |
| OLD | NEW |