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

Unified Diff: mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart

Issue 1575433005: Regenerate Dart .mojom files (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Run tests again? Created 4 years, 11 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
« no previous file with comments | « no previous file | mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_structs.mojom.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart
diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart
index 5bd1cd49039f76771979969715f76d6e5a07cfc7..61776eba0da16c47e893a7798c2d17ce61a8ecbb 100644
--- a/mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart
+++ b/mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart
@@ -307,14 +307,14 @@ class EchoArgsList extends bindings.Struct {
}
-class _CppSideStartTestParams extends bindings.Struct {
+class _CppSidePingResponseParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
const bindings.StructDataHeader(8, 0)
];
- _CppSideStartTestParams() : super(kVersions.last.size);
+ _CppSidePingResponseParams() : super(kVersions.last.size);
- static _CppSideStartTestParams deserialize(bindings.Message message) {
+ static _CppSidePingResponseParams deserialize(bindings.Message message) {
var decoder = new bindings.Decoder(message);
var result = decode(decoder);
if (decoder.excessHandles != null) {
@@ -323,11 +323,11 @@ class _CppSideStartTestParams extends bindings.Struct {
return result;
}
- static _CppSideStartTestParams decode(bindings.Decoder decoder0) {
+ static _CppSidePingResponseParams decode(bindings.Decoder decoder0) {
if (decoder0 == null) {
return null;
}
- _CppSideStartTestParams result = new _CppSideStartTestParams();
+ _CppSidePingResponseParams result = new _CppSidePingResponseParams();
var mainDataHeader = decoder0.decodeStructDataHeader();
if (mainDataHeader.version <= kVersions.last.version) {
@@ -355,7 +355,7 @@ class _CppSideStartTestParams extends bindings.Struct {
}
String toString() {
- return "_CppSideStartTestParams("")";
+ return "_CppSidePingResponseParams("")";
}
Map toJson() {
@@ -365,14 +365,15 @@ class _CppSideStartTestParams extends bindings.Struct {
}
-class _CppSideTestFinishedParams extends bindings.Struct {
+class _CppSideEchoResponseParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
- const bindings.StructDataHeader(8, 0)
+ const bindings.StructDataHeader(16, 0)
];
+ EchoArgsList list = null;
- _CppSideTestFinishedParams() : super(kVersions.last.size);
+ _CppSideEchoResponseParams() : super(kVersions.last.size);
- static _CppSideTestFinishedParams deserialize(bindings.Message message) {
+ static _CppSideEchoResponseParams deserialize(bindings.Message message) {
var decoder = new bindings.Decoder(message);
var result = decode(decoder);
if (decoder.excessHandles != null) {
@@ -381,11 +382,11 @@ class _CppSideTestFinishedParams extends bindings.Struct {
return result;
}
- static _CppSideTestFinishedParams decode(bindings.Decoder decoder0) {
+ static _CppSideEchoResponseParams decode(bindings.Decoder decoder0) {
if (decoder0 == null) {
return null;
}
- _CppSideTestFinishedParams result = new _CppSideTestFinishedParams();
+ _CppSideEchoResponseParams result = new _CppSideEchoResponseParams();
var mainDataHeader = decoder0.decodeStructDataHeader();
if (mainDataHeader.version <= kVersions.last.version) {
@@ -405,32 +406,40 @@ class _CppSideTestFinishedParams extends bindings.Struct {
'Message newer than the last known version cannot be shorter than '
'required by the last known version.');
}
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(8, false);
+ result.list = EchoArgsList.decode(decoder1);
+ }
return result;
}
void encode(bindings.Encoder encoder) {
- encoder.getStructEncoderAtOffset(kVersions.last);
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeStruct(list, 8, false);
}
String toString() {
- return "_CppSideTestFinishedParams("")";
+ return "_CppSideEchoResponseParams("
+ "list: $list" ")";
}
Map toJson() {
- Map map = new Map();
- return map;
+ throw new bindings.MojoCodecError(
+ 'Object containing handles cannot be encoded to JSON.');
}
}
-class _CppSidePingResponseParams extends bindings.Struct {
+class _CppSideStartTestParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
const bindings.StructDataHeader(8, 0)
];
- _CppSidePingResponseParams() : super(kVersions.last.size);
+ _CppSideStartTestParams() : super(kVersions.last.size);
- static _CppSidePingResponseParams deserialize(bindings.Message message) {
+ static _CppSideStartTestParams deserialize(bindings.Message message) {
var decoder = new bindings.Decoder(message);
var result = decode(decoder);
if (decoder.excessHandles != null) {
@@ -439,11 +448,11 @@ class _CppSidePingResponseParams extends bindings.Struct {
return result;
}
- static _CppSidePingResponseParams decode(bindings.Decoder decoder0) {
+ static _CppSideStartTestParams decode(bindings.Decoder decoder0) {
if (decoder0 == null) {
return null;
}
- _CppSidePingResponseParams result = new _CppSidePingResponseParams();
+ _CppSideStartTestParams result = new _CppSideStartTestParams();
var mainDataHeader = decoder0.decodeStructDataHeader();
if (mainDataHeader.version <= kVersions.last.version) {
@@ -471,7 +480,7 @@ class _CppSidePingResponseParams extends bindings.Struct {
}
String toString() {
- return "_CppSidePingResponseParams("")";
+ return "_CppSideStartTestParams("")";
}
Map toJson() {
@@ -481,15 +490,14 @@ class _CppSidePingResponseParams extends bindings.Struct {
}
-class _CppSideEchoResponseParams extends bindings.Struct {
+class _CppSideTestFinishedParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
- const bindings.StructDataHeader(16, 0)
+ const bindings.StructDataHeader(8, 0)
];
- EchoArgsList list = null;
- _CppSideEchoResponseParams() : super(kVersions.last.size);
+ _CppSideTestFinishedParams() : super(kVersions.last.size);
- static _CppSideEchoResponseParams deserialize(bindings.Message message) {
+ static _CppSideTestFinishedParams deserialize(bindings.Message message) {
var decoder = new bindings.Decoder(message);
var result = decode(decoder);
if (decoder.excessHandles != null) {
@@ -498,11 +506,11 @@ class _CppSideEchoResponseParams extends bindings.Struct {
return result;
}
- static _CppSideEchoResponseParams decode(bindings.Decoder decoder0) {
+ static _CppSideTestFinishedParams decode(bindings.Decoder decoder0) {
if (decoder0 == null) {
return null;
}
- _CppSideEchoResponseParams result = new _CppSideEchoResponseParams();
+ _CppSideTestFinishedParams result = new _CppSideTestFinishedParams();
var mainDataHeader = decoder0.decodeStructDataHeader();
if (mainDataHeader.version <= kVersions.last.version) {
@@ -522,28 +530,20 @@ class _CppSideEchoResponseParams extends bindings.Struct {
'Message newer than the last known version cannot be shorter than '
'required by the last known version.');
}
- if (mainDataHeader.version >= 0) {
-
- var decoder1 = decoder0.decodePointer(8, false);
- result.list = EchoArgsList.decode(decoder1);
- }
return result;
}
void encode(bindings.Encoder encoder) {
- var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
-
- encoder0.encodeStruct(list, 8, false);
+ encoder.getStructEncoderAtOffset(kVersions.last);
}
String toString() {
- return "_CppSideEchoResponseParams("
- "list: $list" ")";
+ return "_CppSideTestFinishedParams("")";
}
Map toJson() {
- throw new bindings.MojoCodecError(
- 'Object containing handles cannot be encoded to JSON.');
+ Map map = new Map();
+ return map;
}
}
@@ -746,17 +746,17 @@ class _DartSideEchoParams extends bindings.Struct {
}
}
-const int _CppSide_startTestName = 88888888;
-const int _CppSide_testFinishedName = 99999999;
const int _CppSide_pingResponseName = 100000000;
const int _CppSide_echoResponseName = 100000001;
+const int _CppSide_startTestName = 88888888;
+const int _CppSide_testFinishedName = 99999999;
abstract class CppSide {
static const String serviceName = null;
- void startTest();
- void testFinished();
void pingResponse();
void echoResponse(EchoArgsList list);
+ void startTest();
+ void testFinished();
}
@@ -795,38 +795,38 @@ class _CppSideProxyCalls implements CppSide {
_CppSideProxyImpl _proxyImpl;
_CppSideProxyCalls(this._proxyImpl);
- void startTest() {
+ void pingResponse() {
if (!_proxyImpl.isBound) {
_proxyImpl.proxyError("The Proxy is closed.");
return;
}
- var params = new _CppSideStartTestParams();
- _proxyImpl.sendMessage(params, _CppSide_startTestName);
+ var params = new _CppSidePingResponseParams();
+ _proxyImpl.sendMessage(params, _CppSide_pingResponseName);
}
- void testFinished() {
+ void echoResponse(EchoArgsList list) {
if (!_proxyImpl.isBound) {
_proxyImpl.proxyError("The Proxy is closed.");
return;
}
- var params = new _CppSideTestFinishedParams();
- _proxyImpl.sendMessage(params, _CppSide_testFinishedName);
+ var params = new _CppSideEchoResponseParams();
+ params.list = list;
+ _proxyImpl.sendMessage(params, _CppSide_echoResponseName);
}
- void pingResponse() {
+ void startTest() {
if (!_proxyImpl.isBound) {
_proxyImpl.proxyError("The Proxy is closed.");
return;
}
- var params = new _CppSidePingResponseParams();
- _proxyImpl.sendMessage(params, _CppSide_pingResponseName);
+ var params = new _CppSideStartTestParams();
+ _proxyImpl.sendMessage(params, _CppSide_startTestName);
}
- void echoResponse(EchoArgsList list) {
+ void testFinished() {
if (!_proxyImpl.isBound) {
_proxyImpl.proxyError("The Proxy is closed.");
return;
}
- var params = new _CppSideEchoResponseParams();
- params.list = list;
- _proxyImpl.sendMessage(params, _CppSide_echoResponseName);
+ var params = new _CppSideTestFinishedParams();
+ _proxyImpl.sendMessage(params, _CppSide_testFinishedName);
}
}
@@ -918,16 +918,6 @@ class CppSideStub extends bindings.Stub {
}
assert(_impl != null);
switch (message.header.type) {
- case _CppSide_startTestName:
- var params = _CppSideStartTestParams.deserialize(
- message.payload);
- _impl.startTest();
- break;
- case _CppSide_testFinishedName:
- var params = _CppSideTestFinishedParams.deserialize(
- message.payload);
- _impl.testFinished();
- break;
case _CppSide_pingResponseName:
var params = _CppSidePingResponseParams.deserialize(
message.payload);
@@ -938,6 +928,16 @@ class CppSideStub extends bindings.Stub {
message.payload);
_impl.echoResponse(params.list);
break;
+ case _CppSide_startTestName:
+ var params = _CppSideStartTestParams.deserialize(
+ message.payload);
+ _impl.startTest();
+ break;
+ case _CppSide_testFinishedName:
+ var params = _CppSideTestFinishedParams.deserialize(
+ message.payload);
+ _impl.testFinished();
+ break;
default:
throw new bindings.MojoCodecError("Unexpected message name");
break;
« no previous file with comments | « no previous file | mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_structs.mojom.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698