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

Unified Diff: mojo/public/tools/bindings/generators/mojom_cpp_generator.py

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments Created 4 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
Index: mojo/public/tools/bindings/generators/mojom_cpp_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
index 6ff277a12f4207ba2d8b648f3ee11a50d8c5bb55..38488cf807f626002a1e087d8ff80dda6e8e2b15 100644
--- a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
@@ -142,7 +142,7 @@ def GetCppResultWrapperType(kind):
return "mojo::Map<%s, %s>" % (GetCppArrayArgWrapperType(kind.key_kind),
GetCppArrayArgWrapperType(kind.value_kind))
if mojom.IsInterfaceKind(kind):
- return "%sPtr" % GetNameForKind(kind)
+ return "mojo::InterfaceHandle<%s>" % GetNameForKind(kind)
if mojom.IsInterfaceRequestKind(kind):
return "mojo::InterfaceRequest<%s>" % GetNameForKind(kind.kind)
if mojom.IsStringKind(kind):
@@ -170,7 +170,7 @@ def GetCppWrapperType(kind):
return "mojo::Map<%s, %s>" % (GetCppArrayArgWrapperType(kind.key_kind),
GetCppArrayArgWrapperType(kind.value_kind))
if mojom.IsInterfaceKind(kind):
- return "%sPtr" % GetNameForKind(kind)
+ return "mojo::InterfaceHandle<%s>" % GetNameForKind(kind)
if mojom.IsInterfaceRequestKind(kind):
return "mojo::InterfaceRequest<%s>" % GetNameForKind(kind.kind)
if mojom.IsStringKind(kind):
@@ -196,7 +196,7 @@ def GetCppConstWrapperType(kind):
return "mojo::Map<%s, %s>" % (GetCppArrayArgWrapperType(kind.key_kind),
GetCppArrayArgWrapperType(kind.value_kind))
if mojom.IsInterfaceKind(kind):
- return "%sPtr" % GetNameForKind(kind)
+ return "mojo::InterfaceHandle<%s>" % GetNameForKind(kind)
if mojom.IsInterfaceRequestKind(kind):
return "mojo::InterfaceRequest<%s>" % GetNameForKind(kind.kind)
if mojom.IsEnumKind(kind):

Powered by Google App Engine
This is Rietveld 408576698