From 3aeb0b84598e215c9ff270785b1250854b6bd8a0 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 2 Feb 2016 11:51:28 -0800 Subject: Make Screenlock observe shell screenlock state. R=sky@chromium.org BUG=none Review URL: https://codereview.chromium.org/1648423002 Cr-Commit-Position: refs/heads/master@{#373008} --- mojo/common/weak_binding_set.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mojo/common') diff --git a/mojo/common/weak_binding_set.h b/mojo/common/weak_binding_set.h index 10d7ee0..6485c4f 100644 --- a/mojo/common/weak_binding_set.h +++ b/mojo/common/weak_binding_set.h @@ -39,6 +39,14 @@ class WeakBindingSet { bindings_.push_back(binding->GetWeakPtr()); } + // Returns an InterfacePtr bound to one end of a pipe whose other end is + // bound to |this|. + InterfacePtr CreateInterfacePtrAndBind(Interface* impl) { + InterfacePtr interface_ptr; + AddBinding(impl, GetProxy(&interface_ptr)); + return interface_ptr; + } + void CloseAllBindings() { for (const auto& it : bindings_) { if (it) { -- cgit v1.1