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

Unified Diff: services/shell/public/cpp/lib/interface_registry.cc

Issue 2108343002: Defer Mojo interface binding in the gpu process until OnInitialize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « services/shell/public/cpp/interface_registry.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/lib/interface_registry.cc
diff --git a/services/shell/public/cpp/lib/interface_registry.cc b/services/shell/public/cpp/lib/interface_registry.cc
index fb34590a667e50093239b8b39bd8361265ae0976..ebfaddd35ace806392e426ee68569432371092bd 100644
--- a/services/shell/public/cpp/lib/interface_registry.cc
+++ b/services/shell/public/cpp/lib/interface_registry.cc
@@ -38,6 +38,18 @@ void InterfaceRegistry::RemoveInterface(const std::string& name) {
name_to_binder_.erase(it);
}
+void InterfaceRegistry::PauseBinding() {
+ DCHECK(!pending_request_.is_pending());
+ DCHECK(binding_.is_bound());
+ pending_request_ = binding_.Unbind();
+}
+
+void InterfaceRegistry::ResumeBinding() {
+ DCHECK(pending_request_.is_pending());
+ DCHECK(!binding_.is_bound());
+ binding_.Bind(std::move(pending_request_));
+}
+
// mojom::InterfaceProvider:
void InterfaceRegistry::GetInterface(const mojo::String& interface_name,
mojo::ScopedMessagePipeHandle handle) {
« no previous file with comments | « services/shell/public/cpp/interface_registry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698