| 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 #include "chrome/browser/component_updater/swiftshader_component_installer.h" | 5 #include "chrome/browser/component_updater/swiftshader_component_installer.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 void FinishSwiftShaderUpdateRegistration(ComponentUpdateService* cus, | 171 void FinishSwiftShaderUpdateRegistration(ComponentUpdateService* cus, |
| 172 const base::Version& version) { | 172 const base::Version& version) { |
| 173 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 173 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 174 | 174 |
| 175 update_client::CrxComponent swiftshader; | 175 update_client::CrxComponent swiftshader; |
| 176 swiftshader.name = "Swift Shader"; | 176 swiftshader.name = "Swift Shader"; |
| 177 swiftshader.installer = new SwiftShaderComponentInstaller(version); | 177 swiftshader.installer = new SwiftShaderComponentInstaller(version); |
| 178 swiftshader.version = version; | 178 swiftshader.version = version; |
| 179 swiftshader.pk_hash.assign(kSha2Hash, &kSha2Hash[sizeof(kSha2Hash)]); | 179 swiftshader.pk_hash.assign(kSha2Hash, &kSha2Hash[sizeof(kSha2Hash)]); |
| 180 swiftshader.supports_group_policy_enable_component_updates = true; |
| 180 if (!cus->RegisterComponent(swiftshader)) { | 181 if (!cus->RegisterComponent(swiftshader)) { |
| 181 NOTREACHED() << "SwiftShader component registration fail"; | 182 NOTREACHED() << "SwiftShader component registration fail"; |
| 182 } | 183 } |
| 183 } | 184 } |
| 184 | 185 |
| 185 class UpdateChecker : public content::GpuDataManagerObserver { | 186 class UpdateChecker : public content::GpuDataManagerObserver { |
| 186 public: | 187 public: |
| 187 explicit UpdateChecker(ComponentUpdateService* cus); | 188 explicit UpdateChecker(ComponentUpdateService* cus); |
| 188 | 189 |
| 189 void OnGpuInfoUpdate() override; | 190 void OnGpuInfoUpdate() override; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 257 |
| 257 void RegisterSwiftShaderComponent(ComponentUpdateService* cus) { | 258 void RegisterSwiftShaderComponent(ComponentUpdateService* cus) { |
| 258 #if defined(ENABLE_SWIFTSHADER) | 259 #if defined(ENABLE_SWIFTSHADER) |
| 259 BrowserThread::PostTask(BrowserThread::FILE, | 260 BrowserThread::PostTask(BrowserThread::FILE, |
| 260 FROM_HERE, | 261 FROM_HERE, |
| 261 base::Bind(&RegisterSwiftShaderPath, cus)); | 262 base::Bind(&RegisterSwiftShaderPath, cus)); |
| 262 #endif | 263 #endif |
| 263 } | 264 } |
| 264 | 265 |
| 265 } // namespace component_updater | 266 } // namespace component_updater |
| OLD | NEW |