| Index: content/browser/gpu/gpu_data_manager_impl.cc
|
| ===================================================================
|
| --- content/browser/gpu/gpu_data_manager_impl.cc (revision 184684)
|
| +++ content/browser/gpu/gpu_data_manager_impl.cc (working copy)
|
| @@ -23,6 +23,7 @@
|
| #include "content/browser/gpu/gpu_util.h"
|
| #include "content/common/gpu/gpu_messages.h"
|
| #include "content/gpu/gpu_info_collector.h"
|
| +#include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/gpu_data_manager_observer.h"
|
| #include "content/public/common/content_client.h"
|
| #include "content/public/common/content_constants.h"
|
| @@ -560,9 +561,21 @@
|
| BlockDomainFrom3DAPIsAtTime(url, guilt, base::Time::Now());
|
| }
|
|
|
| -GpuDataManagerImpl::DomainBlockStatus
|
| -GpuDataManagerImpl::Are3DAPIsBlocked(const GURL& url) const {
|
| - return Are3DAPIsBlockedAtTime(url, base::Time::Now());
|
| +bool GpuDataManagerImpl::Are3DAPIsBlocked(const GURL& url,
|
| + int render_process_id,
|
| + int render_view_id,
|
| + ThreeDAPIType requester) {
|
| + bool blocked = Are3DAPIsBlockedAtTime(url, base::Time::Now()) !=
|
| + GpuDataManagerImpl::DOMAIN_BLOCK_STATUS_NOT_BLOCKED;
|
| + if (blocked) {
|
| + BrowserThread::PostTask(
|
| + BrowserThread::UI, FROM_HERE,
|
| + base::Bind(&GpuDataManagerImpl::Notify3DAPIBlocked,
|
| + base::Unretained(this), url, render_process_id,
|
| + render_view_id, requester));
|
| + }
|
| +
|
| + return blocked;
|
| }
|
|
|
| void GpuDataManagerImpl::DisableDomainBlockingFor3DAPIsForTesting() {
|
| @@ -782,4 +795,12 @@
|
| return kBlockAllDomainsMs;
|
| }
|
|
|
| +void GpuDataManagerImpl::Notify3DAPIBlocked(const GURL& url,
|
| + int render_process_id,
|
| + int render_view_id,
|
| + ThreeDAPIType requester) {
|
| + observer_list_->Notify(&GpuDataManagerObserver::DidBlock3DAPIs,
|
| + url, render_process_id, render_view_id, requester);
|
| +}
|
| +
|
| } // namespace content
|
|
|