OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_COMMON_ASSOCIATED_INTERFACE_REGISTRY_IMPL_H_ |
| 6 #define CONTENT_COMMON_ASSOCIATED_INTERFACE_REGISTRY_IMPL_H_ |
| 7 |
| 8 #include <map> |
| 9 #include <string> |
| 10 |
| 11 #include "base/macros.h" |
| 12 #include "content/public/common/associated_interface_registry.h" |
| 13 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h" |
| 14 |
| 15 namespace content { |
| 16 |
| 17 class AssociatedInterfaceRegistryImpl : public AssociatedInterfaceRegistry { |
| 18 public: |
| 19 AssociatedInterfaceRegistryImpl(); |
| 20 ~AssociatedInterfaceRegistryImpl() override; |
| 21 |
| 22 void BindRequest(const std::string& interface_name, |
| 23 mojo::ScopedInterfaceEndpointHandle handle); |
| 24 |
| 25 // AssociatedInterfaceRegistry: |
| 26 void AddInterface(const std::string& name, const Binder& binder) override; |
| 27 void RemoveInterface(const std::string& name) override; |
| 28 |
| 29 private: |
| 30 std::map<std::string, Binder> interfaces_; |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(AssociatedInterfaceRegistryImpl); |
| 33 }; |
| 34 |
| 35 } // namespace content |
| 36 |
| 37 #endif // CONTENT_COMMON_ASSOCIATED_INTERFACE_REGISTRY_IMPL_H_ |
OLD | NEW |