| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/gpu/gpu_data_manager_impl.h" | 5 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 6 | 6 |
| 7 #include "content/browser/gpu/gpu_data_manager_impl_private.h" | 7 #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
| 8 #include "gpu/ipc/common/memory_stats.h" | 8 #include "gpu/ipc/common/memory_stats.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 void GpuDataManagerImpl::DisableDomainBlockingFor3DAPIsForTesting() { | 235 void GpuDataManagerImpl::DisableDomainBlockingFor3DAPIsForTesting() { |
| 236 base::AutoLock auto_lock(lock_); | 236 base::AutoLock auto_lock(lock_); |
| 237 private_->DisableDomainBlockingFor3DAPIsForTesting(); | 237 private_->DisableDomainBlockingFor3DAPIsForTesting(); |
| 238 } | 238 } |
| 239 | 239 |
| 240 size_t GpuDataManagerImpl::GetBlacklistedFeatureCount() const { | 240 size_t GpuDataManagerImpl::GetBlacklistedFeatureCount() const { |
| 241 base::AutoLock auto_lock(lock_); | 241 base::AutoLock auto_lock(lock_); |
| 242 return private_->GetBlacklistedFeatureCount(); | 242 return private_->GetBlacklistedFeatureCount(); |
| 243 } | 243 } |
| 244 | 244 |
| 245 void GpuDataManagerImpl::SetDisplayCount(unsigned int display_count) { | |
| 246 base::AutoLock auto_lock(lock_); | |
| 247 private_->SetDisplayCount(display_count); | |
| 248 } | |
| 249 | |
| 250 unsigned int GpuDataManagerImpl::GetDisplayCount() const { | |
| 251 base::AutoLock auto_lock(lock_); | |
| 252 return private_->GetDisplayCount(); | |
| 253 } | |
| 254 | |
| 255 bool GpuDataManagerImpl::UpdateActiveGpu(uint32_t vendor_id, | 245 bool GpuDataManagerImpl::UpdateActiveGpu(uint32_t vendor_id, |
| 256 uint32_t device_id) { | 246 uint32_t device_id) { |
| 257 base::AutoLock auto_lock(lock_); | 247 base::AutoLock auto_lock(lock_); |
| 258 return private_->UpdateActiveGpu(vendor_id, device_id); | 248 return private_->UpdateActiveGpu(vendor_id, device_id); |
| 259 } | 249 } |
| 260 | 250 |
| 261 void GpuDataManagerImpl::Notify3DAPIBlocked(const GURL& top_origin_url, | 251 void GpuDataManagerImpl::Notify3DAPIBlocked(const GURL& top_origin_url, |
| 262 int render_process_id, | 252 int render_process_id, |
| 263 int render_frame_id, | 253 int render_frame_id, |
| 264 ThreeDAPIType requester) { | 254 ThreeDAPIType requester) { |
| 265 base::AutoLock auto_lock(lock_); | 255 base::AutoLock auto_lock(lock_); |
| 266 private_->Notify3DAPIBlocked( | 256 private_->Notify3DAPIBlocked( |
| 267 top_origin_url, render_process_id, render_frame_id, requester); | 257 top_origin_url, render_process_id, render_frame_id, requester); |
| 268 } | 258 } |
| 269 | 259 |
| 270 void GpuDataManagerImpl::OnGpuProcessInitFailure() { | 260 void GpuDataManagerImpl::OnGpuProcessInitFailure() { |
| 271 base::AutoLock auto_lock(lock_); | 261 base::AutoLock auto_lock(lock_); |
| 272 private_->OnGpuProcessInitFailure(); | 262 private_->OnGpuProcessInitFailure(); |
| 273 } | 263 } |
| 274 | 264 |
| 275 GpuDataManagerImpl::GpuDataManagerImpl() | 265 GpuDataManagerImpl::GpuDataManagerImpl() |
| 276 : private_(GpuDataManagerImplPrivate::Create(this)) { | 266 : private_(GpuDataManagerImplPrivate::Create(this)) { |
| 277 } | 267 } |
| 278 | 268 |
| 279 GpuDataManagerImpl::~GpuDataManagerImpl() { | 269 GpuDataManagerImpl::~GpuDataManagerImpl() { |
| 280 } | 270 } |
| 281 | 271 |
| 282 } // namespace content | 272 } // namespace content |
| OLD | NEW |