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 vsync_mojom; | 5 library vsync_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; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 } | 145 } |
146 | 146 |
147 | 147 |
148 | 148 |
149 | 149 |
150 const int _VSyncProvider_awaitVSyncName = 0; | 150 const int _VSyncProvider_awaitVSyncName = 0; |
151 | 151 |
152 | 152 |
153 | 153 |
154 class _VSyncProviderServiceDescription implements service_describer.ServiceDescr
iption { | 154 class _VSyncProviderServiceDescription implements service_describer.ServiceDescr
iption { |
155 dynamic getTopLevelInterface([Function responseFactory]) => null; | 155 dynamic getTopLevelInterface([Function responseFactory]) => |
| 156 responseFactory(null); |
156 | 157 |
157 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null; | 158 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
| 159 responseFactory(null); |
158 | 160 |
159 dynamic getAllTypeDefinitions([Function responseFactory]) => null; | 161 dynamic getAllTypeDefinitions([Function responseFactory]) => |
| 162 responseFactory(null); |
160 } | 163 } |
161 | 164 |
162 abstract class VSyncProvider { | 165 abstract class VSyncProvider { |
163 static const String serviceName = "vsync::VSyncProvider"; | 166 static const String serviceName = "vsync::VSyncProvider"; |
164 dynamic awaitVSync([Function responseFactory = null]); | 167 dynamic awaitVSync([Function responseFactory = null]); |
165 } | 168 } |
166 | 169 |
167 | 170 |
168 class _VSyncProviderProxyImpl extends bindings.Proxy { | 171 class _VSyncProviderProxyImpl extends bindings.Proxy { |
169 _VSyncProviderProxyImpl.fromEndpoint( | 172 _VSyncProviderProxyImpl.fromEndpoint( |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 _impl = d; | 364 _impl = d; |
362 } | 365 } |
363 | 366 |
364 String toString() { | 367 String toString() { |
365 var superString = super.toString(); | 368 var superString = super.toString(); |
366 return "VSyncProviderStub($superString)"; | 369 return "VSyncProviderStub($superString)"; |
367 } | 370 } |
368 | 371 |
369 int get version => 0; | 372 int get version => 0; |
370 | 373 |
371 service_describer.ServiceDescription get serviceDescription => | 374 static service_describer.ServiceDescription _cachedServiceDescription; |
372 new _VSyncProviderServiceDescription(); | 375 static service_describer.ServiceDescription get serviceDescription { |
| 376 if (_cachedServiceDescription == null) { |
| 377 _cachedServiceDescription = new _VSyncProviderServiceDescription(); |
| 378 } |
| 379 return _cachedServiceDescription; |
| 380 } |
373 } | 381 } |
374 | 382 |
375 | 383 |
376 | 384 |
OLD | NEW |