Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Unified Diff: mojo/public/python/mojo_bindings/reflection.py

Issue 917923003: Python bindings: Add helper function to create InterfaceRequest (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 35b8ff294a16019dc07e16d1d59ea23e6083d457..c9e4ee0017171eaa7eb6d2481354b0b1fe9d8061 100644
--- a/mojo/public/python/mojo_bindings/reflection.py
+++ b/mojo/public/python/mojo_bindings/reflection.py
@@ -12,6 +12,7 @@ import sys
import mojo_bindings.messaging as messaging
import mojo_bindings.promise as promise
import mojo_bindings.serialization as serialization
+import mojo_system
class MojoEnumType(type):
@@ -273,6 +274,10 @@ class InterfaceManager(object):
router.Start()
+ def NewRequest(self):
+ pipe = mojo_system.MessagePipe()
+ return (self.Proxy(pipe.handle0), InterfaceRequest(pipe.handle1))
+
def _InternalProxy(self, router, error_handler):
if error_handler is None:
error_handler = _ProxyErrorHandler()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698