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

Unified Diff: mojo/public/tools/bindings/generators/go_templates/interface.tmpl

Issue 974153003: Go bindings: Generate a CreateMessagePipeFor{{interface}} helper (Closed) Base URL: git@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/tools/bindings/generators/go_templates/interface.tmpl
diff --git a/mojo/public/tools/bindings/generators/go_templates/interface.tmpl b/mojo/public/tools/bindings/generators/go_templates/interface.tmpl
index d41df270b4fc2f27c959f1435a5d2a39886ed452..808e7b0bd24d52ef64a2fdfb9ad41e22769aeb95 100644
--- a/mojo/public/tools/bindings/generators/go_templates/interface.tmpl
+++ b/mojo/public/tools/bindings/generators/go_templates/interface.tmpl
@@ -45,6 +45,13 @@ type {{interface|name}} interface {
type {{interface|name}}Request bindings.InterfaceRequest
type {{interface|name}}Pointer bindings.InterfacePointer
+// CreateMessagePipeFor{{interface|name}} creates a message pipe for use with the
+// {{interface|name}} interface with a {{interface|name}}Request on one end and a {{interface|name}}Pointer on the other.
+func CreateMessagePipeFor{{interface|name}}() ({{interface|name}}Request, {{interface|name}}Pointer) {
+ r, p := bindings.CreateMessagePipeForMojoInterface()
+ return {{interface|name}}Request(r), {{interface|name}}Pointer(p)
+}
+
{% for method in interface.methods %}
const {{interface|name(False)}}_{{method|name}}_Name = {{method.ordinal}}
{% endfor %}
« 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