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

Unified Diff: content/browser/browser_child_process_host_impl.cc

Issue 2625933002: content/gpu: Set up a mojom connection between browser and gpu. (Closed)
Patch Set: 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/browser_child_process_host_impl.cc
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index 185c8e7c33ac7090b8f95b08c03d66249d4367ae..6ec66403e5b6295b0c60e30d89d658d1c8f7e3b0 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -161,6 +161,7 @@ BrowserChildProcessHostImpl::BrowserChildProcessHostImpl(
: data_(process_type),
delegate_(delegate),
child_token_(mojo::edk::GenerateRandomToken()),
+ channel_(nullptr),
is_channel_connected_(false),
notify_child_disconnected_(false),
weak_factory_(this) {
@@ -396,6 +397,10 @@ bool BrowserChildProcessHostImpl::CanShutdown() {
return delegate_->CanShutdown();
}
+void BrowserChildProcessHostImpl::OnChannelInitialized(IPC::Channel* channel) {
+ channel_ = channel;
+}
+
void BrowserChildProcessHostImpl::OnChildDisconnected() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
#if defined(OS_WIN)
@@ -455,6 +460,7 @@ void BrowserChildProcessHostImpl::OnChildDisconnected() {
}
#endif
}
+ channel_ = nullptr;
delete delegate_; // Will delete us
}

Powered by Google App Engine
This is Rietveld 408576698