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

Side by Side Diff: mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl

Issue 540913003: mojo: Java bindings: Add name to the manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 {% from "constant_definition.tmpl" import constant_def %} 1 {% from "constant_definition.tmpl" import constant_def %}
2 {% from "enum_definition.tmpl" import enum_def %} 2 {% from "enum_definition.tmpl" import enum_def %}
3 {% from "struct_definition.tmpl" import struct_def %} 3 {% from "struct_definition.tmpl" import struct_def %}
4 4
5 {%- macro declare_params(parameters, boxed=false) %} 5 {%- macro declare_params(parameters, boxed=false) %}
6 {%- for param in parameters -%} 6 {%- for param in parameters -%}
7 {{param.kind|java_type(boxed)}} {{param|name}} 7 {{param.kind|java_type(boxed)}} {{param|name}}
8 {%- if not loop.last %}, {% endif %} 8 {%- if not loop.last %}, {% endif %}
9 {%- endfor %} 9 {%- endfor %}
10 {%- endmacro %} 10 {%- endmacro %}
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 {%- macro manager_class(interface, client, fully_qualified=False) -%} 61 {%- macro manager_class(interface, client, fully_qualified=False) -%}
62 {% if fully_qualified %}{{super_class(client, False)}}.{% endif %}Manager<{{inte rface|name}}, {{interface|name}}.Proxy 62 {% if fully_qualified %}{{super_class(client, False)}}.{% endif %}Manager<{{inte rface|name}}, {{interface|name}}.Proxy
63 {%- if client -%}, {{client|java_type}}{%- endif -%} 63 {%- if client -%}, {{client|java_type}}{%- endif -%}
64 > 64 >
65 {%- endmacro -%} 65 {%- endmacro -%}
66 66
67 {%- macro manager_def(interface, client) -%} 67 {%- macro manager_def(interface, client) -%}
68 public static final {{manager_class(interface, client, True)}} MANAGER = 68 public static final {{manager_class(interface, client, True)}} MANAGER =
69 new {{manager_class(interface, client, True)}}() { 69 new {{manager_class(interface, client, True)}}() {
70 70
71 public String getName() {
72 return "{{namespace|replace(".","::")}}::{{interface.name}}";
73 }
74
71 public Proxy buildProxy(org.chromium.mojo.system.Core core, 75 public Proxy buildProxy(org.chromium.mojo.system.Core core,
72 org.chromium.mojo.bindings.MessageReceiverWithRespon der messageReceiver) { 76 org.chromium.mojo.bindings.MessageReceiverWithRespon der messageReceiver) {
73 return new Proxy(core, messageReceiver); 77 return new Proxy(core, messageReceiver);
74 } 78 }
75 79
76 public Stub buildStub(org.chromium.mojo.system.Core core, {{interface|name}} impl) { 80 public Stub buildStub(org.chromium.mojo.system.Core core, {{interface|name}} impl) {
77 return new Stub(core, impl); 81 return new Stub(core, impl);
78 } 82 }
79 83
80 public {{interface|name}}[] buildArray(int size) { 84 public {{interface|name}}[] buildArray(int size) {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 {{flags_for_method(method, False)}}, 283 {{flags_for_method(method, False)}},
280 mRequestId)); 284 mRequestId));
281 mMessageReceiver.accept(message); 285 mMessageReceiver.accept(message);
282 } 286 }
283 } 287 }
284 {% endif %} 288 {% endif %}
285 {% endfor %} 289 {% endfor %}
286 290
287 } 291 }
288 {% endmacro %} 292 {% endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698