Index: content/browser/gpu/browser_gpu_channel_host_factory.cc |
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc |
index b9876e88fc117395ce1d11f1fe86f5e36836822f..7a3f339affb5f9a4bfbca5c99731a70f8887da40 100644 |
--- a/content/browser/gpu/browser_gpu_channel_host_factory.cc |
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc |
@@ -198,6 +198,14 @@ void BrowserGpuChannelHostFactory::EstablishRequest::Cancel() { |
finished_ = true; |
} |
+void BrowserGpuChannelHostFactory::CloseChannel() { |
+ DCHECK(instance_); |
+ if (instance_->gpu_channel_) { |
+ instance_->gpu_channel_->DestroyChannel(); |
+ instance_->gpu_channel_ = nullptr; |
+ } |
+} |
+ |
bool BrowserGpuChannelHostFactory::CanUseForTesting() { |
return GpuDataManager::GetInstance()->GpuAccessAllowed(NULL); |
} |