Index: content/common/associated_interface_registry_impl.h |
diff --git a/content/common/associated_interface_registry_impl.h b/content/common/associated_interface_registry_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1f624a2f8efe9ec83f4b4f3b2b25679bfe5e48fb |
--- /dev/null |
+++ b/content/common/associated_interface_registry_impl.h |
@@ -0,0 +1,37 @@ |
+// Copyright 2016 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. |
+ |
+#ifndef CONTENT_COMMON_ASSOCIATED_INTERFACE_REGISTRY_IMPL_H_ |
+#define CONTENT_COMMON_ASSOCIATED_INTERFACE_REGISTRY_IMPL_H_ |
+ |
+#include <map> |
+#include <string> |
+ |
+#include "base/macros.h" |
+#include "content/public/common/associated_interface_registry.h" |
+#include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h" |
+ |
+namespace content { |
+ |
+class AssociatedInterfaceRegistryImpl : public AssociatedInterfaceRegistry { |
+ public: |
+ AssociatedInterfaceRegistryImpl(); |
+ ~AssociatedInterfaceRegistryImpl() override; |
+ |
+ void BindRequest(const std::string& interface_name, |
+ mojo::ScopedInterfaceEndpointHandle handle); |
+ |
+ // AssociatedInterfaceRegistry: |
+ void AddInterface(const std::string& name, const Binder& binder) override; |
+ void RemoveInterface(const std::string& name) override; |
+ |
+ private: |
+ std::map<std::string, Binder> interfaces_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(AssociatedInterfaceRegistryImpl); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_COMMON_ASSOCIATED_INTERFACE_REGISTRY_IMPL_H_ |