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 "chrome/browser/gpu_process_host.h" | 5 #include "chrome/browser/gpu_process_host.h" |
6 | 6 |
7 #include "app/app_switches.h" | 7 #include "app/app_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/thread.h" | 9 #include "base/thread.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 78 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
79 std::wstring gpu_launcher = | 79 std::wstring gpu_launcher = |
80 browser_command_line.GetSwitchValue(switches::kGpuLauncher); | 80 browser_command_line.GetSwitchValue(switches::kGpuLauncher); |
81 | 81 |
82 FilePath exe_path = ChildProcessHost::GetChildPath(gpu_launcher.empty()); | 82 FilePath exe_path = ChildProcessHost::GetChildPath(gpu_launcher.empty()); |
83 if (exe_path.empty()) | 83 if (exe_path.empty()) |
84 return false; | 84 return false; |
85 | 85 |
86 CommandLine* cmd_line = new CommandLine(exe_path); | 86 CommandLine* cmd_line = new CommandLine(exe_path); |
87 cmd_line->AppendSwitchWithValue(switches::kProcessType, | 87 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); |
88 switches::kGpuProcess); | 88 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); |
89 cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, | |
90 ASCIIToWide(channel_id())); | |
91 | 89 |
92 // Propagate relevant command line switches. | 90 // Propagate relevant command line switches. |
93 static const char* const kSwitchNames[] = { | 91 static const char* const kSwitchNames[] = { |
94 switches::kUseGL, | 92 switches::kUseGL, |
95 switches::kDisableLogging, | 93 switches::kDisableLogging, |
96 switches::kEnableLogging, | 94 switches::kEnableLogging, |
97 switches::kGpuStartupDialog, | 95 switches::kGpuStartupDialog, |
98 switches::kLoggingLevel, | 96 switches::kLoggingLevel, |
99 }; | 97 }; |
100 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 98 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 211 |
214 URLRequestContext* GpuProcessHost::GetRequestContext( | 212 URLRequestContext* GpuProcessHost::GetRequestContext( |
215 uint32 request_id, | 213 uint32 request_id, |
216 const ViewHostMsg_Resource_Request& request_data) { | 214 const ViewHostMsg_Resource_Request& request_data) { |
217 return NULL; | 215 return NULL; |
218 } | 216 } |
219 | 217 |
220 bool GpuProcessHost::CanShutdown() { | 218 bool GpuProcessHost::CanShutdown() { |
221 return true; | 219 return true; |
222 } | 220 } |
OLD | NEW |