blob: 3f855f428eff92125bc46bb1e48368a159a79dad [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "mojo/public/cpp/bindings/binding_set.h"
#include "mojo/public/cpp/bindings/unique_ptr_impl_ref_traits.h"
namespace mojo {
// This class manages a set of bindings. When the pipe a binding is bound to is
// disconnected, the binding is automatically destroyed and removed from the
// set, and the interface implementation is deleted. When the StrongBindingSet
// is destructed, all outstanding bindings in the set are destroyed and all the
// bound interface implementations are automatically deleted.
template <typename Interface,
typename ContextType = void,
typename Deleter = std::default_delete<Interface>>
using StrongBindingSet = BindingSetBase<
Binding<Interface, UniquePtrImplRefTraits<Interface, Deleter>>,
} // namespace mojo