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

Unified Diff: services/shell/public/cpp/interface_registry.h

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 | « content/gpu/gpu_child_thread.cc ('k') | services/shell/public/cpp/lib/interface_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/interface_registry.h
diff --git a/services/shell/public/cpp/interface_registry.h b/services/shell/public/cpp/interface_registry.h
index f5d10dcbb7201dff05a285aa0a84f047dc077e6b..97a46ebfbfcede33f242964adfa501c832180d77 100644
--- a/services/shell/public/cpp/interface_registry.h
+++ b/services/shell/public/cpp/interface_registry.h
@@ -104,6 +104,14 @@ class InterfaceRegistry : public mojom::InterfaceProvider {
}
void RemoveInterface(const std::string& name);
+ // Temporarily prevent incoming interface requests from being bound. Incoming
+ // requests will be queued internally and dispatched once UnpauseBinding() is
+ // called.
+ void PauseBinding();
+
+ // Resumes incoming interface request binding.
+ void ResumeBinding();
+
private:
using NameToInterfaceBinderMap =
std::map<std::string, std::unique_ptr<InterfaceBinder>>;
@@ -117,6 +125,8 @@ class InterfaceRegistry : public mojom::InterfaceProvider {
bool SetInterfaceBinderForName(std::unique_ptr<InterfaceBinder> binder,
const std::string& name);
+ mojom::InterfaceProviderRequest pending_request_;
+
mojo::Binding<mojom::InterfaceProvider> binding_;
Connection* connection_;
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | services/shell/public/cpp/lib/interface_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698