| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef GPU_CONFIG_GPU_INFO_H_ | 5 #ifndef GPU_CONFIG_GPU_INFO_H_ |
| 6 #define GPU_CONFIG_GPU_INFO_H_ | 6 #define GPU_CONFIG_GPU_INFO_H_ |
| 7 | 7 |
| 8 // Provides access to the GPU information for the system | 8 // Provides access to the GPU information for the system |
| 9 // on which chrome is currently running. | 9 // on which chrome is currently running. |
| 10 | 10 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 bool software_rendering; | 134 bool software_rendering; |
| 135 | 135 |
| 136 // Whether the gpu process is running in a sandbox. | 136 // Whether the gpu process is running in a sandbox. |
| 137 bool sandboxed; | 137 bool sandboxed; |
| 138 | 138 |
| 139 #if defined(OS_WIN) | 139 #if defined(OS_WIN) |
| 140 // The information returned by the DirectX Diagnostics Tool. | 140 // The information returned by the DirectX Diagnostics Tool. |
| 141 DxDiagNode dx_diagnostics; | 141 DxDiagNode dx_diagnostics; |
| 142 #endif | 142 #endif |
| 143 // Note: when adding new members, please remember to update EnumerateFields |
| 144 // in gpu_info.cc. |
| 145 |
| 146 // In conjunction with EnumerateFields, this allows the embedder to |
| 147 // enumerate the values in this structure without having to embed |
| 148 // references to its specific member variables. This simplifies the |
| 149 // addition of new fields to this type. |
| 150 class Enumerator { |
| 151 public: |
| 152 // The following methods apply to the "current" object. Initially this |
| 153 // is the root object, but calls to BeginGPUDevice/EndGPUDevice and |
| 154 // BeginAuxAttributes/EndAuxAttributes change the object to which these |
| 155 // calls should apply. |
| 156 virtual void AddInt64(const char* name, int64 value) = 0; |
| 157 virtual void AddInt(const char* name, int value) = 0; |
| 158 virtual void AddString(const char* name, const std::string& value) = 0; |
| 159 virtual void AddBool(const char* name, bool value) = 0; |
| 160 virtual void AddTimeDeltaInSecondsF(const char* name, |
| 161 const base::TimeDelta& value) = 0; |
| 162 |
| 163 // Markers indicating that a GPUDevice is being described. |
| 164 virtual void BeginGPUDevice() = 0; |
| 165 virtual void EndGPUDevice() = 0; |
| 166 |
| 167 // Markers indicating that "auxiliary" attributes of the GPUInfo |
| 168 // (according to the DevTools protocol) are being described. |
| 169 virtual void BeginAuxAttributes() = 0; |
| 170 virtual void EndAuxAttributes() = 0; |
| 171 |
| 172 protected: |
| 173 virtual ~Enumerator() {} |
| 174 }; |
| 175 |
| 176 // Outputs the fields in this structure to the provided enumerator. |
| 177 void EnumerateFields(Enumerator* enumerator) const; |
| 143 }; | 178 }; |
| 144 | 179 |
| 145 } // namespace gpu | 180 } // namespace gpu |
| 146 | 181 |
| 147 #endif // GPU_CONFIG_GPU_INFO_H_ | 182 #endif // GPU_CONFIG_GPU_INFO_H_ |
| OLD | NEW |