Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(969)

Unified Diff: content/browser/gpu/browser_gpu_channel_host_factory.cc

Issue 2633053002: Remove the MessageLoop::DestructionObserver from mojo bindings. (Closed)
Patch Set: rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698