OLD | NEW |
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 viewport_parameter_listener_mojom; | 5 library viewport_parameter_listener_mojom; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:mojo/bindings.dart' as bindings; | 9 import 'package:mojo/bindings.dart' as bindings; |
10 import 'package:mojo/core.dart' as core; | 10 import 'package:mojo/core.dart' as core; |
| 11 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types; |
| 12 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
11 | 13 |
12 | 14 |
13 | 15 |
14 class _ViewportParameterListenerOnVSyncParametersUpdatedParams extends bindings.
Struct { | 16 class _ViewportParameterListenerOnVSyncParametersUpdatedParams extends bindings.
Struct { |
15 static const List<bindings.StructDataHeader> kVersions = const [ | 17 static const List<bindings.StructDataHeader> kVersions = const [ |
16 const bindings.StructDataHeader(24, 0) | 18 const bindings.StructDataHeader(24, 0) |
17 ]; | 19 ]; |
18 int timebase = 0; | 20 int timebase = 0; |
19 int interval = 0; | 21 int interval = 0; |
20 | 22 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 } | 81 } |
80 | 82 |
81 Map toJson() { | 83 Map toJson() { |
82 Map map = new Map(); | 84 Map map = new Map(); |
83 map["timebase"] = timebase; | 85 map["timebase"] = timebase; |
84 map["interval"] = interval; | 86 map["interval"] = interval; |
85 return map; | 87 return map; |
86 } | 88 } |
87 } | 89 } |
88 | 90 |
| 91 |
| 92 |
| 93 |
89 const int _ViewportParameterListener_onVSyncParametersUpdatedName = 0; | 94 const int _ViewportParameterListener_onVSyncParametersUpdatedName = 0; |
90 | 95 |
| 96 |
| 97 |
| 98 class _ViewportParameterListenerServiceDescription implements service_describer.
ServiceDescription { |
| 99 dynamic getTopLevelInterface([Function responseFactory]) => null; |
| 100 |
| 101 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null; |
| 102 |
| 103 dynamic getAllTypeDefinitions([Function responseFactory]) => null; |
| 104 } |
| 105 |
91 abstract class ViewportParameterListener { | 106 abstract class ViewportParameterListener { |
92 static const String serviceName = null; | 107 static const String serviceName = null; |
93 void onVSyncParametersUpdated(int timebase, int interval); | 108 void onVSyncParametersUpdated(int timebase, int interval); |
94 } | 109 } |
95 | 110 |
96 | 111 |
97 class _ViewportParameterListenerProxyImpl extends bindings.Proxy { | 112 class _ViewportParameterListenerProxyImpl extends bindings.Proxy { |
98 _ViewportParameterListenerProxyImpl.fromEndpoint( | 113 _ViewportParameterListenerProxyImpl.fromEndpoint( |
99 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 114 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
100 | 115 |
101 _ViewportParameterListenerProxyImpl.fromHandle(core.MojoHandle handle) : | 116 _ViewportParameterListenerProxyImpl.fromHandle(core.MojoHandle handle) : |
102 super.fromHandle(handle); | 117 super.fromHandle(handle); |
103 | 118 |
104 _ViewportParameterListenerProxyImpl.unbound() : super.unbound(); | 119 _ViewportParameterListenerProxyImpl.unbound() : super.unbound(); |
105 | 120 |
106 static _ViewportParameterListenerProxyImpl newFromEndpoint( | 121 static _ViewportParameterListenerProxyImpl newFromEndpoint( |
107 core.MojoMessagePipeEndpoint endpoint) { | 122 core.MojoMessagePipeEndpoint endpoint) { |
108 assert(endpoint.setDescription("For _ViewportParameterListenerProxyImpl")); | 123 assert(endpoint.setDescription("For _ViewportParameterListenerProxyImpl")); |
109 return new _ViewportParameterListenerProxyImpl.fromEndpoint(endpoint); | 124 return new _ViewportParameterListenerProxyImpl.fromEndpoint(endpoint); |
110 } | 125 } |
111 | 126 |
| 127 service_describer.ServiceDescription get serviceDescription => |
| 128 new _ViewportParameterListenerServiceDescription(); |
| 129 |
112 void handleResponse(bindings.ServiceMessage message) { | 130 void handleResponse(bindings.ServiceMessage message) { |
113 switch (message.header.type) { | 131 switch (message.header.type) { |
114 default: | 132 default: |
115 proxyError("Unexpected message type: ${message.header.type}"); | 133 proxyError("Unexpected message type: ${message.header.type}"); |
116 close(immediate: true); | 134 close(immediate: true); |
117 break; | 135 break; |
118 } | 136 } |
119 } | 137 } |
120 | 138 |
121 String toString() { | 139 String toString() { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 assert(_impl == null); | 264 assert(_impl == null); |
247 _impl = d; | 265 _impl = d; |
248 } | 266 } |
249 | 267 |
250 String toString() { | 268 String toString() { |
251 var superString = super.toString(); | 269 var superString = super.toString(); |
252 return "ViewportParameterListenerStub($superString)"; | 270 return "ViewportParameterListenerStub($superString)"; |
253 } | 271 } |
254 | 272 |
255 int get version => 0; | 273 int get version => 0; |
| 274 |
| 275 service_describer.ServiceDescription get serviceDescription => |
| 276 new _ViewportParameterListenerServiceDescription(); |
256 } | 277 } |
257 | 278 |
258 | 279 |
| 280 |
OLD | NEW |