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

Side by Side Diff: mojo/dart/packages/mojo_services/lib/mojo/media/rate_control.mojom.dart

Issue 1983453002: Dart: Refactor Stubs (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 library rate_control_mojom; 5 library rate_control_mojom;
6 import 'dart:async'; 6 import 'dart:async';
7 import 'package:mojo/bindings.dart' as bindings; 7 import 'package:mojo/bindings.dart' as bindings;
8 import 'package:mojo/core.dart' as core; 8 import 'package:mojo/core.dart' as core;
9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic e_describer; 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic e_describer;
10 10
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 static const String serviceName = null; 869 static const String serviceName = null;
870 dynamic getCurrentTransform([Function responseFactory = null]); 870 dynamic getCurrentTransform([Function responseFactory = null]);
871 void setCurrentQuad(TimelineQuad quad); 871 void setCurrentQuad(TimelineQuad quad);
872 void setTargetTimelineId(int id); 872 void setTargetTimelineId(int id);
873 void setRate(int referenceDelta, int targetDelta); 873 void setRate(int referenceDelta, int targetDelta);
874 void setRateAtReferenceTime(int referenceDelta, int targetDelta, int reference Time); 874 void setRateAtReferenceTime(int referenceDelta, int targetDelta, int reference Time);
875 void setRateAtTargetTime(int referenceDelta, int targetDelta, int targetTime); 875 void setRateAtTargetTime(int referenceDelta, int targetDelta, int targetTime);
876 void cancelPendingChanges(); 876 void cancelPendingChanges();
877 } 877 }
878 878
879 879 class _RateControlProxyControl
880 class _RateControlProxyControl extends bindings.ProxyMessageHandler 880 extends bindings.ProxyMessageHandler
881 implements bindings.ProxyControl { 881 implements bindings.ProxyControl {
882 _RateControlProxyControl.fromEndpoint( 882 _RateControlProxyControl.fromEndpoint(
883 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 883 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
884 884
885 _RateControlProxyControl.fromHandle( 885 _RateControlProxyControl.fromHandle(
886 core.MojoHandle handle) : super.fromHandle(handle); 886 core.MojoHandle handle) : super.fromHandle(handle);
887 887
888 _RateControlProxyControl.unbound() : super.unbound(); 888 _RateControlProxyControl.unbound() : super.unbound();
889 889
890 service_describer.ServiceDescription get serviceDescription => 890 service_describer.ServiceDescription get serviceDescription =>
891 new _RateControlServiceDescription(); 891 new _RateControlServiceDescription();
892 892
893 String get serviceName => RateControl.serviceName; 893 String get serviceName => RateControl.serviceName;
894 894
895 @override
896 void handleResponse(bindings.ServiceMessage message) { 895 void handleResponse(bindings.ServiceMessage message) {
897 switch (message.header.type) { 896 switch (message.header.type) {
898 case _rateControlMethodGetCurrentTransformName: 897 case _rateControlMethodGetCurrentTransformName:
899 var r = RateControlGetCurrentTransformResponseParams.deserialize( 898 var r = RateControlGetCurrentTransformResponseParams.deserialize(
900 message.payload); 899 message.payload);
901 if (!message.header.hasRequestId) { 900 if (!message.header.hasRequestId) {
902 proxyError("Expected a message with a valid request Id."); 901 proxyError("Expected a message with a valid request Id.");
903 return; 902 return;
904 } 903 }
905 Completer c = completerMap[message.header.requestId]; 904 Completer c = completerMap[message.header.requestId];
(...skipping 16 matching lines...) Expand all
922 } 921 }
923 } 922 }
924 923
925 @override 924 @override
926 String toString() { 925 String toString() {
927 var superString = super.toString(); 926 var superString = super.toString();
928 return "_RateControlProxyControl($superString)"; 927 return "_RateControlProxyControl($superString)";
929 } 928 }
930 } 929 }
931 930
932 931 class RateControlProxy
933 class RateControlProxy extends bindings.Proxy 932 extends bindings.Proxy
934 implements RateControl { 933 implements RateControl {
935 RateControlProxy.fromEndpoint( 934 RateControlProxy.fromEndpoint(
936 core.MojoMessagePipeEndpoint endpoint) 935 core.MojoMessagePipeEndpoint endpoint)
937 : super(new _RateControlProxyControl.fromEndpoint(endpoint)); 936 : super(new _RateControlProxyControl.fromEndpoint(endpoint));
938 937
939 RateControlProxy.fromHandle(core.MojoHandle handle) 938 RateControlProxy.fromHandle(core.MojoHandle handle)
940 : super(new _RateControlProxyControl.fromHandle(handle)); 939 : super(new _RateControlProxyControl.fromHandle(handle));
941 940
942 RateControlProxy.unbound() 941 RateControlProxy.unbound()
943 : super(new _RateControlProxyControl.unbound()); 942 : super(new _RateControlProxyControl.unbound());
944 943
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 if (!ctrl.isBound) { 1022 if (!ctrl.isBound) {
1024 ctrl.proxyError("The Proxy is closed."); 1023 ctrl.proxyError("The Proxy is closed.");
1025 return; 1024 return;
1026 } 1025 }
1027 var params = new _RateControlCancelPendingChangesParams(); 1026 var params = new _RateControlCancelPendingChangesParams();
1028 ctrl.sendMessage(params, 1027 ctrl.sendMessage(params,
1029 _rateControlMethodCancelPendingChangesName); 1028 _rateControlMethodCancelPendingChangesName);
1030 } 1029 }
1031 } 1030 }
1032 1031
1033 1032 class _RateControlStubControl
1034 class RateControlStub extends bindings.Stub { 1033 extends bindings.StubMessageHandler
1034 implements bindings.StubControl<RateControl> {
1035 RateControl _impl; 1035 RateControl _impl;
1036 1036
1037 RateControlStub.fromEndpoint( 1037 _RateControlStubControl.fromEndpoint(
1038 core.MojoMessagePipeEndpoint endpoint, [RateControl impl]) 1038 core.MojoMessagePipeEndpoint endpoint, [RateControl impl])
1039 : super.fromEndpoint(endpoint, autoBegin: impl != null) { 1039 : super.fromEndpoint(endpoint, autoBegin: impl != null) {
1040 _impl = impl; 1040 _impl = impl;
1041 } 1041 }
1042 1042
1043 RateControlStub.fromHandle( 1043 _RateControlStubControl.fromHandle(
1044 core.MojoHandle handle, [RateControl impl]) 1044 core.MojoHandle handle, [RateControl impl])
1045 : super.fromHandle(handle, autoBegin: impl != null) { 1045 : super.fromHandle(handle, autoBegin: impl != null) {
1046 _impl = impl; 1046 _impl = impl;
1047 } 1047 }
1048 1048
1049 RateControlStub.unbound([this._impl]) : super.unbound(); 1049 _RateControlStubControl.unbound([this._impl]) : super.unbound();
1050
1051 static RateControlStub newFromEndpoint(
1052 core.MojoMessagePipeEndpoint endpoint) {
1053 assert(endpoint.setDescription("For RateControlStub"));
1054 return new RateControlStub.fromEndpoint(endpoint);
1055 }
1056 1050
1057 1051
1058 RateControlGetCurrentTransformResponseParams _rateControlGetCurrentTransformRe sponseParamsFactory(TimelineTransform trans) { 1052 RateControlGetCurrentTransformResponseParams _rateControlGetCurrentTransformRe sponseParamsFactory(TimelineTransform trans) {
1059 var result = new RateControlGetCurrentTransformResponseParams(); 1053 var result = new RateControlGetCurrentTransformResponseParams();
1060 result.trans = trans; 1054 result.trans = trans;
1061 return result; 1055 return result;
1062 } 1056 }
1063 1057
1064 dynamic handleMessage(bindings.ServiceMessage message) { 1058 dynamic handleMessage(bindings.ServiceMessage message) {
1065 if (bindings.ControlMessageHandler.isControlMessage(message)) { 1059 if (bindings.ControlMessageHandler.isControlMessage(message)) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 } 1132 }
1139 1133
1140 @override 1134 @override
1141 void bind(core.MojoMessagePipeEndpoint endpoint) { 1135 void bind(core.MojoMessagePipeEndpoint endpoint) {
1142 super.bind(endpoint); 1136 super.bind(endpoint);
1143 if (!isOpen && (_impl != null)) { 1137 if (!isOpen && (_impl != null)) {
1144 beginHandlingEvents(); 1138 beginHandlingEvents();
1145 } 1139 }
1146 } 1140 }
1147 1141
1142 @override
1148 String toString() { 1143 String toString() {
1149 var superString = super.toString(); 1144 var superString = super.toString();
1150 return "RateControlStub($superString)"; 1145 return "_RateControlStubControl($superString)";
1151 } 1146 }
1152 1147
1153 int get version => 0; 1148 int get version => 0;
1154 1149
1155 static service_describer.ServiceDescription _cachedServiceDescription; 1150 static service_describer.ServiceDescription _cachedServiceDescription;
1156 static service_describer.ServiceDescription get serviceDescription { 1151 static service_describer.ServiceDescription get serviceDescription {
1157 if (_cachedServiceDescription == null) { 1152 if (_cachedServiceDescription == null) {
1158 _cachedServiceDescription = new _RateControlServiceDescription(); 1153 _cachedServiceDescription = new _RateControlServiceDescription();
1159 } 1154 }
1160 return _cachedServiceDescription; 1155 return _cachedServiceDescription;
1161 } 1156 }
1162 } 1157 }
1163 1158
1159 class RateControlStub
1160 extends bindings.Stub<RateControl>
1161 implements RateControl {
1162 RateControlStub.fromEndpoint(
1163 core.MojoMessagePipeEndpoint endpoint, [RateControl impl])
1164 : super(new _RateControlStubControl.fromEndpoint(endpoint, impl));
1165
1166 RateControlStub.fromHandle(
1167 core.MojoHandle handle, [RateControl impl])
1168 : super(new _RateControlStubControl.fromHandle(handle, impl));
1169
1170 RateControlStub.unbound([RateControl impl])
1171 : super(new _RateControlStubControl.unbound(impl));
1172
1173 static RateControlStub newFromEndpoint(
1174 core.MojoMessagePipeEndpoint endpoint) {
1175 assert(endpoint.setDescription("For RateControlStub"));
1176 return new RateControlStub.fromEndpoint(endpoint);
1177 }
1178
1179 static service_describer.ServiceDescription get serviceDescription =>
1180 _RateControlStubControl.serviceDescription;
1181
1182
1183 dynamic getCurrentTransform([Function responseFactory = null]) {
1184 return impl.getCurrentTransform(responseFactory);
1185 }
1186 void setCurrentQuad(TimelineQuad quad) {
1187 return impl.setCurrentQuad(quad);
1188 }
1189 void setTargetTimelineId(int id) {
1190 return impl.setTargetTimelineId(id);
1191 }
1192 void setRate(int referenceDelta, int targetDelta) {
1193 return impl.setRate(referenceDelta, targetDelta);
1194 }
1195 void setRateAtReferenceTime(int referenceDelta, int targetDelta, int reference Time) {
1196 return impl.setRateAtReferenceTime(referenceDelta, targetDelta, referenceTim e);
1197 }
1198 void setRateAtTargetTime(int referenceDelta, int targetDelta, int targetTime) {
1199 return impl.setRateAtTargetTime(referenceDelta, targetDelta, targetTime);
1200 }
1201 void cancelPendingChanges() {
1202 return impl.cancelPendingChanges();
1203 }
1204 }
1205
1164 1206
1165 1207
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698