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

Unified Diff: third_party/mojo/src/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl

Issue 1127293003: Update mojo sdk to rev f84766d3b6420b7cf6a113d9d65d73cb5fe18d90 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting Created 5 years, 7 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: third_party/mojo/src/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl b/third_party/mojo/src/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl
index d666e66432eecf16275e68f3201cb91874836800..be9b7d36529850095e19be0e11b1d23b6795fdad 100644
--- a/third_party/mojo/src/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl
+++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl
@@ -62,6 +62,10 @@ public static final {{manager_class(interface, True)}} MANAGER =
return "{{namespace|replace(".","::")}}::{{interface.name}}";
}
+ public int getVersion() {
+ return {{interface.version}};
+ }
+
public Proxy buildProxy(org.chromium.mojo.system.Core core,
org.chromium.mojo.bindings.MessageReceiverWithResponder messageReceiver) {
return new Proxy(core, messageReceiver);
@@ -78,8 +82,6 @@ public static final {{manager_class(interface, True)}} MANAGER =
{%- endmacro -%}
{%- macro accept_body(interface, with_response) -%}
-{% if (interface|has_method_with_response and with_response) or
- (interface|has_method_without_response and not with_response) %}
try {
org.chromium.mojo.bindings.ServiceMessage messageWithHeader =
message.asServiceMessage();
@@ -88,6 +90,15 @@ try {
return false;
}
switch(header.getType()) {
+{% if with_response %}
+ case org.chromium.mojo.bindings.InterfaceControlMessagesConstants.RUN_MESSAGE_ID:
+ return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.handleRun(
+ getCore(), {{interface|name}}_Internal.MANAGER, messageWithHeader, receiver);
+{% else %}
+ case org.chromium.mojo.bindings.InterfaceControlMessagesConstants.RUN_OR_CLOSE_PIPE_MESSAGE_ID:
+ return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.handleRunOrClosePipe(
+ {{interface|name}}_Internal.MANAGER, messageWithHeader);
+{% endif %}
{% for method in interface.methods %}
{% if (with_response and method.response_parameters != None) or
(not with_response and method.response_parameters == None) %}
@@ -113,9 +124,6 @@ try {
} catch (org.chromium.mojo.bindings.DeserializationException e) {
return false;
}
-{% else %}
-return false;
-{% endif %}
{%- endmacro -%}
{% macro interface_def(interface) %}

Powered by Google App Engine
This is Rietveld 408576698