| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_CONNECTOR_H_ | 5 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_CONNECTOR_H_ |
| 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_CONNECTOR_H_ | 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_CONNECTOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "services/service_manager/public/cpp/identity.h" | 10 #include "services/service_manager/public/cpp/identity.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 virtual void BindInterface(const Identity& target, | 106 virtual void BindInterface(const Identity& target, |
| 107 const std::string& interface_name, | 107 const std::string& interface_name, |
| 108 mojo::ScopedMessagePipeHandle interface_pipe) = 0; | 108 mojo::ScopedMessagePipeHandle interface_pipe) = 0; |
| 109 | 109 |
| 110 // Creates a new instance of this class which may be passed to another thread. | 110 // Creates a new instance of this class which may be passed to another thread. |
| 111 // The returned object may be passed multiple times until StartService() or | 111 // The returned object may be passed multiple times until StartService() or |
| 112 // BindInterface() is called, at which point this method must be called again | 112 // BindInterface() is called, at which point this method must be called again |
| 113 // to pass again. | 113 // to pass again. |
| 114 virtual std::unique_ptr<Connector> Clone() = 0; | 114 virtual std::unique_ptr<Connector> Clone() = 0; |
| 115 | 115 |
| 116 virtual void FilterInterfaces(const std::string& spec, |
| 117 const Identity& source_identity, |
| 118 mojom::InterfaceProviderRequest request, |
| 119 mojom::InterfaceProviderPtr target) = 0; |
| 120 |
| 116 // Binds a Connector request to the other end of this Connector. | 121 // Binds a Connector request to the other end of this Connector. |
| 117 virtual void BindConnectorRequest(mojom::ConnectorRequest request) = 0; | 122 virtual void BindConnectorRequest(mojom::ConnectorRequest request) = 0; |
| 118 | 123 |
| 119 virtual base::WeakPtr<Connector> GetWeakPtr() = 0; | 124 virtual base::WeakPtr<Connector> GetWeakPtr() = 0; |
| 120 | 125 |
| 121 protected: | 126 protected: |
| 122 virtual void OverrideBinderForTesting(const std::string& service_name, | 127 virtual void OverrideBinderForTesting(const std::string& service_name, |
| 123 const std::string& interface_name, | 128 const std::string& interface_name, |
| 124 const TestApi::Binder& binder) = 0; | 129 const TestApi::Binder& binder) = 0; |
| 125 virtual void ClearBinderOverrides() = 0; | 130 virtual void ClearBinderOverrides() = 0; |
| 126 virtual void SetStartServiceCallback( | 131 virtual void SetStartServiceCallback( |
| 127 const StartServiceCallback& callback) = 0; | 132 const StartServiceCallback& callback) = 0; |
| 128 virtual void ResetStartServiceCallback() = 0; | 133 virtual void ResetStartServiceCallback() = 0; |
| 129 }; | 134 }; |
| 130 | 135 |
| 131 } // namespace service_manager | 136 } // namespace service_manager |
| 132 | 137 |
| 133 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_CONNECTOR_H_ | 138 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_CONNECTOR_H_ |
| OLD | NEW |