| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 initialized_successfully_ = Init(); | 69 initialized_successfully_ = Init(); |
| 70 } | 70 } |
| 71 return initialized_successfully_; | 71 return initialized_successfully_; |
| 72 } | 72 } |
| 73 | 73 |
| 74 bool GpuProcessHost::Init() { | 74 bool GpuProcessHost::Init() { |
| 75 if (!CreateChannel()) | 75 if (!CreateChannel()) |
| 76 return false; | 76 return false; |
| 77 | 77 |
| 78 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 78 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
| 79 std::wstring gpu_launcher = | 79 CommandLine::StringType gpu_launcher = |
| 80 browser_command_line.GetSwitchValue(switches::kGpuLauncher); | 80 browser_command_line.GetSwitchValueNative(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->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); | 87 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); |
| 88 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); | 88 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); |
| 89 | 89 |
| 90 // Propagate relevant command line switches. | 90 // Propagate relevant command line switches. |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 211 |
| 212 URLRequestContext* GpuProcessHost::GetRequestContext( | 212 URLRequestContext* GpuProcessHost::GetRequestContext( |
| 213 uint32 request_id, | 213 uint32 request_id, |
| 214 const ViewHostMsg_Resource_Request& request_data) { | 214 const ViewHostMsg_Resource_Request& request_data) { |
| 215 return NULL; | 215 return NULL; |
| 216 } | 216 } |
| 217 | 217 |
| 218 bool GpuProcessHost::CanShutdown() { | 218 bool GpuProcessHost::CanShutdown() { |
| 219 return true; | 219 return true; |
| 220 } | 220 } |
| OLD | NEW |