| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/devtools/protocol/system_info_handler.h" | 5 #include "content/browser/devtools/protocol/system_info_handler.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 devices->addItem(GPUDeviceToProtocol(gpu_info.gpu)); | 103 devices->addItem(GPUDeviceToProtocol(gpu_info.gpu)); |
| 104 for (const auto& device : gpu_info.secondary_gpus) | 104 for (const auto& device : gpu_info.secondary_gpus) |
| 105 devices->addItem(GPUDeviceToProtocol(device)); | 105 devices->addItem(GPUDeviceToProtocol(device)); |
| 106 | 106 |
| 107 std::unique_ptr<protocol::DictionaryValue> aux_attributes = | 107 std::unique_ptr<protocol::DictionaryValue> aux_attributes = |
| 108 protocol::DictionaryValue::create(); | 108 protocol::DictionaryValue::create(); |
| 109 AuxGPUInfoEnumerator enumerator(aux_attributes.get()); | 109 AuxGPUInfoEnumerator enumerator(aux_attributes.get()); |
| 110 gpu_info.EnumerateFields(&enumerator); | 110 gpu_info.EnumerateFields(&enumerator); |
| 111 | 111 |
| 112 std::unique_ptr<base::DictionaryValue> base_feature_status = | 112 std::unique_ptr<base::DictionaryValue> base_feature_status = |
| 113 base::WrapUnique(GetFeatureStatus()); | 113 GetFeatureStatus(); |
| 114 std::unique_ptr<protocol::DictionaryValue> feature_status = | 114 std::unique_ptr<protocol::DictionaryValue> feature_status = |
| 115 protocol::DictionaryValue::cast( | 115 protocol::DictionaryValue::cast( |
| 116 protocol::toProtocolValue(base_feature_status.get(), 1000)); | 116 protocol::toProtocolValue(base_feature_status.get(), 1000)); |
| 117 | 117 |
| 118 std::unique_ptr<protocol::Array<std::string>> driver_bug_workarounds = | 118 std::unique_ptr<protocol::Array<std::string>> driver_bug_workarounds = |
| 119 protocol::Array<std::string>::create(); | 119 protocol::Array<std::string>::create(); |
| 120 for (const std::string& s : GetDriverBugWorkarounds()) | 120 for (const std::string& s : GetDriverBugWorkarounds()) |
| 121 driver_bug_workarounds->addItem(s); | 121 driver_bug_workarounds->addItem(s); |
| 122 | 122 |
| 123 std::unique_ptr<GPUInfo> gpu = GPUInfo::Create() | 123 std::unique_ptr<GPUInfo> gpu = GPUInfo::Create() |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 } else { | 215 } else { |
| 216 // We will be able to get more information from the GpuDataManager. | 216 // We will be able to get more information from the GpuDataManager. |
| 217 // Register a transient observer with it to call us back when the | 217 // Register a transient observer with it to call us back when the |
| 218 // information is available. | 218 // information is available. |
| 219 new SystemInfoHandlerGpuObserver(std::move(callback)); | 219 new SystemInfoHandlerGpuObserver(std::move(callback)); |
| 220 } | 220 } |
| 221 } | 221 } |
| 222 | 222 |
| 223 } // namespace protocol | 223 } // namespace protocol |
| 224 } // namespace content | 224 } // namespace content |
| OLD | NEW |