Index: mojo/public/python/mojo_bindings/reflection.py |
diff --git a/mojo/public/python/mojo_bindings/reflection.py b/mojo/public/python/mojo_bindings/reflection.py |
index 7b8edf6819c3209a0df49c4ea3d8ed1a14834029..5432691c3e783147eeb67d699b6a54ff413d7320 100644 |
--- a/mojo/public/python/mojo_bindings/reflection.py |
+++ b/mojo/public/python/mojo_bindings/reflection.py |
@@ -182,10 +182,8 @@ class MojoInterfaceType(type): |
for method in methods: |
dictionary[method.name] = _NotImplemented |
client_class_getter = descriptor.get('client', None) |
- fully_qualified_name = descriptor['fully_qualified_name'] |
- interface_manager = InterfaceManager(fully_qualified_name, methods, |
- client_class_getter) |
+ interface_manager = InterfaceManager(name, methods, client_class_getter) |
dictionary.update({ |
'client': None, |
'manager': None, |
@@ -233,9 +231,6 @@ class InterfaceRequest(object): |
self._handle = None |
return result |
- def Bind(self, impl): |
- type(impl).manager.Bind(impl, self.PassMessagePipe()) |
- |
class InterfaceManager(object): |
""" |
@@ -287,7 +282,7 @@ class InterfaceManager(object): |
# Give an instance manager to the implementation to allow it to close |
# the connection. |
- impl.manager = InstanceManager(router, error_handler) |
+ impl.manager = InstanceManager(router) |
router.Start() |
@@ -309,7 +304,7 @@ class InterfaceManager(object): |
proxy = self._proxy_class(router, error_handler) |
# Give an instance manager to the proxy to allow to close the connection. |
- proxy.manager = InstanceManager(router, error_handler) |
+ proxy.manager = InstanceManager(router) |
return proxy |
def _Stub(self, impl): |
@@ -332,18 +327,14 @@ class InstanceManager(object): |
Manager for the implementation of an interface or a proxy. The manager allows |
to control the connection over the pipe. |
""" |
- def __init__(self, router, error_handler): |
- self._router = router |
- self._error_handler = error_handler |
+ def __init__(self, router): |
+ self.router = router |
def Close(self): |
- self._router.Close() |
+ self.router.Close() |
def PassMessagePipe(self): |
- return self._router.PassMessagePipe() |
- |
- def AddOnErrorCallback(self, callback): |
- self._error_handler.AddCallback(lambda _: callback()) |
+ return self.router.PassMessagePipe() |
class _MethodDescriptor(object): |