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

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

Issue 468713002: JavaScript bindings for Mojo message validation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updates per yzshen's second round of feedback Created 6 years, 4 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 8f90c419d57c1dc1377f79806d743a5723290856..08bcefa21452eb21666a61324cec758ddce7325f 100644
--- a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
@@ -228,12 +228,6 @@ def TranslateConstants(token, kind):
def ExpressionToText(value, kind=None):
return TranslateConstants(value, kind)
-def HasCallbacks(interface):
- for method in interface.methods:
- if method.response_parameters != None:
- return True
- return False
-
def ShouldInlineStruct(struct):
# TODO(darin): Base this on the size of the wrapper class.
if len(struct.fields) > 4:
@@ -260,7 +254,7 @@ class Generator(generator.Generator):
"expression_to_text": ExpressionToText,
"get_name_for_kind": GetNameForKind,
"get_pad": pack.GetPad,
- "has_callbacks": HasCallbacks,
+ "has_callbacks": mojom.HasCallbacks,
"should_inline": ShouldInlineStruct,
"is_any_array_kind": mojom.IsAnyArrayKind,
"is_enum_kind": mojom.IsEnumKind,

Powered by Google App Engine
This is Rietveld 408576698