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

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

Issue 1157843002: Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/dart_templates/interface_definition.tmpl
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl b/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl
index 0fbcb49557d4aec4b7883d26954100b841c48b23..6e3cae4f23ac18c6f26ef9a16b0812c287dbaed0 100644
--- a/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl
+++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl
@@ -160,6 +160,14 @@ class {{interface|name}}Proxy implements bindings.ProxyBase {
Future close({bool immediate: false}) => impl.close(immediate: immediate);
+ int get version => impl.version;
+
+ Future<int> queryVersion() => impl.queryVersion();
+
+ void requireVersion(int requiredVersion) {
+ impl.requireVersion(requiredVersion);
+ }
+
String toString() {
return "{{interface|name}}Proxy($impl)";
}
@@ -202,6 +210,11 @@ class {{interface|name}}Stub extends bindings.Stub {
{%- endfor %}
Future<bindings.Message> handleMessage(bindings.ServiceMessage message) {
+ if (bindings.ControlMessageHandler.isControlMessage(message)) {
+ return bindings.ControlMessageHandler.handleMessage(this,
+ {{interface.version}},
+ message);
+ }
assert(_impl != null);
switch (message.header.type) {
{%- for method in interface.methods %}
@@ -241,7 +254,7 @@ class {{interface|name}}Stub extends bindings.Stub {
}
{{interface|name}} get impl => _impl;
- set impl({{interface|name}} d) {
+ set impl({{interface|name}} d) {
assert(_impl == null);
_impl = d;
}
@@ -250,4 +263,6 @@ class {{interface|name}}Stub extends bindings.Stub {
var superString = super.toString();
return "{{interface|name}}Stub($superString)";
}
+
+ int get version => {{interface.version}};
}

Powered by Google App Engine
This is Rietveld 408576698