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/common/child_process_logging.h" | 5 #include "chrome/common/child_process_logging.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 if (!exe_module) | 132 if (!exe_module) |
133 return; | 133 return; |
134 set_gpu_info = reinterpret_cast<MainSetGpuInfo>( | 134 set_gpu_info = reinterpret_cast<MainSetGpuInfo>( |
135 GetProcAddress(exe_module, "SetGpuInfo")); | 135 GetProcAddress(exe_module, "SetGpuInfo")); |
136 if (!set_gpu_info) | 136 if (!set_gpu_info) |
137 return; | 137 return; |
138 } | 138 } |
139 (set_gpu_info)( | 139 (set_gpu_info)( |
140 base::UintToString16(gpu_info.vendor_id()).c_str(), | 140 base::UintToString16(gpu_info.vendor_id()).c_str(), |
141 base::UintToString16(gpu_info.device_id()).c_str(), | 141 base::UintToString16(gpu_info.device_id()).c_str(), |
142 gpu_info.driver_version().c_str(), | 142 UTF8ToUTF16(gpu_info.driver_version()).c_str(), |
143 base::UintToString16(gpu_info.pixel_shader_version()).c_str(), | 143 base::UintToString16(gpu_info.pixel_shader_version()).c_str(), |
144 base::UintToString16(gpu_info.vertex_shader_version()).c_str()); | 144 base::UintToString16(gpu_info.vertex_shader_version()).c_str()); |
145 } | 145 } |
146 | 146 |
147 void SetNumberOfViews(int number_of_views) { | 147 void SetNumberOfViews(int number_of_views) { |
148 static MainSetNumberOfViews set_number_of_views = NULL; | 148 static MainSetNumberOfViews set_number_of_views = NULL; |
149 if (!set_number_of_views) { | 149 if (!set_number_of_views) { |
150 HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName); | 150 HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName); |
151 if (!exe_module) | 151 if (!exe_module) |
152 return; | 152 return; |
153 set_number_of_views = reinterpret_cast<MainSetNumberOfViews>( | 153 set_number_of_views = reinterpret_cast<MainSetNumberOfViews>( |
154 GetProcAddress(exe_module, "SetNumberOfViews")); | 154 GetProcAddress(exe_module, "SetNumberOfViews")); |
155 if (!set_number_of_views) | 155 if (!set_number_of_views) |
156 return; | 156 return; |
157 } | 157 } |
158 (set_number_of_views)(number_of_views); | 158 (set_number_of_views)(number_of_views); |
159 } | 159 } |
160 | 160 |
161 } // namespace child_process_logging | 161 } // namespace child_process_logging |
OLD | NEW |