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

Unified Diff: mojo/dart/packages/mojo_services/lib/mojo/media/media_clock.mojom.dart

Issue 1874003002: Motown: Get rid of speculative clock definition (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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: mojo/dart/packages/mojo_services/lib/mojo/media/media_clock.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/mojo/media/media_clock.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/media/media_clock.mojom.dart
deleted file mode 100644
index 7cc5dd2f1c942523209258ba7458a55baa428881..0000000000000000000000000000000000000000
--- a/mojo/dart/packages/mojo_services/lib/mojo/media/media_clock.mojom.dart
+++ /dev/null
@@ -1,265 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-library media_clock_mojom;
-import 'dart:async';
-import 'package:mojo/bindings.dart' as bindings;
-import 'package:mojo/core.dart' as core;
-import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as service_describer;
-
-class ClockDisposition extends bindings.MojoEnum {
- static const ClockDisposition passive = const ClockDisposition._(0);
- static const ClockDisposition slave = const ClockDisposition._(1);
- static const ClockDisposition preferSlave = const ClockDisposition._(2);
- static const ClockDisposition indifferent = const ClockDisposition._(3);
- static const ClockDisposition preferMaster = const ClockDisposition._(4);
- static const ClockDisposition master = const ClockDisposition._(5);
-
- const ClockDisposition._(int v) : super(v);
-
- static const Map<String, ClockDisposition> valuesMap = const {
- "passive": passive,
- "slave": slave,
- "preferSlave": preferSlave,
- "indifferent": indifferent,
- "preferMaster": preferMaster,
- "master": master,
- };
- static const List<ClockDisposition> values = const [
- passive,
- slave,
- preferSlave,
- indifferent,
- preferMaster,
- master,
- ];
-
- static ClockDisposition valueOf(String name) => valuesMap[name];
-
- factory ClockDisposition(int v) {
- switch (v) {
- case 0:
- return ClockDisposition.passive;
- case 1:
- return ClockDisposition.slave;
- case 2:
- return ClockDisposition.preferSlave;
- case 3:
- return ClockDisposition.indifferent;
- case 4:
- return ClockDisposition.preferMaster;
- case 5:
- return ClockDisposition.master;
- default:
- return null;
- }
- }
-
- static ClockDisposition decode(bindings.Decoder decoder0, int offset) {
- int v = decoder0.decodeUint32(offset);
- ClockDisposition result = new ClockDisposition(v);
- if (result == null) {
- throw new bindings.MojoCodecError(
- 'Bad value $v for enum ClockDisposition.');
- }
- return result;
- }
-
- String toString() {
- switch(this) {
- case passive:
- return 'ClockDisposition.passive';
- case slave:
- return 'ClockDisposition.slave';
- case preferSlave:
- return 'ClockDisposition.preferSlave';
- case indifferent:
- return 'ClockDisposition.indifferent';
- case preferMaster:
- return 'ClockDisposition.preferMaster';
- case master:
- return 'ClockDisposition.master';
- default:
- return null;
- }
- }
-
- int toJson() => mojoEnumValue;
-}
-
-
-
-class _ClockServiceDescription implements service_describer.ServiceDescription {
- dynamic getTopLevelInterface([Function responseFactory]) =>
- responseFactory(null);
-
- dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
- responseFactory(null);
-
- dynamic getAllTypeDefinitions([Function responseFactory]) =>
- responseFactory(null);
-}
-
-abstract class Clock {
- static const String serviceName = null;
-}
-
-
-class _ClockProxyImpl extends bindings.Proxy {
- _ClockProxyImpl.fromEndpoint(
- core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
-
- _ClockProxyImpl.fromHandle(core.MojoHandle handle) :
- super.fromHandle(handle);
-
- _ClockProxyImpl.unbound() : super.unbound();
-
- static _ClockProxyImpl newFromEndpoint(
- core.MojoMessagePipeEndpoint endpoint) {
- assert(endpoint.setDescription("For _ClockProxyImpl"));
- return new _ClockProxyImpl.fromEndpoint(endpoint);
- }
-
- service_describer.ServiceDescription get serviceDescription =>
- new _ClockServiceDescription();
-
- void handleResponse(bindings.ServiceMessage message) {
- switch (message.header.type) {
- default:
- proxyError("Unexpected message type: ${message.header.type}");
- close(immediate: true);
- break;
- }
- }
-
- String toString() {
- var superString = super.toString();
- return "_ClockProxyImpl($superString)";
- }
-}
-
-
-class _ClockProxyCalls implements Clock {
- _ClockProxyCalls(_ClockProxyImpl _);
-}
-
-
-class ClockProxy implements bindings.ProxyBase {
- final bindings.Proxy impl;
- Clock ptr;
-
- ClockProxy(_ClockProxyImpl proxyImpl) :
- impl = proxyImpl,
- ptr = new _ClockProxyCalls(proxyImpl);
-
- ClockProxy.fromEndpoint(
- core.MojoMessagePipeEndpoint endpoint) :
- impl = new _ClockProxyImpl.fromEndpoint(endpoint) {
- ptr = new _ClockProxyCalls(impl);
- }
-
- ClockProxy.fromHandle(core.MojoHandle handle) :
- impl = new _ClockProxyImpl.fromHandle(handle) {
- ptr = new _ClockProxyCalls(impl);
- }
-
- ClockProxy.unbound() :
- impl = new _ClockProxyImpl.unbound() {
- ptr = new _ClockProxyCalls(impl);
- }
-
- factory ClockProxy.connectToService(
- bindings.ServiceConnector s, String url, [String serviceName]) {
- ClockProxy p = new ClockProxy.unbound();
- s.connectToService(url, p, serviceName);
- return p;
- }
-
- static ClockProxy newFromEndpoint(
- core.MojoMessagePipeEndpoint endpoint) {
- assert(endpoint.setDescription("For ClockProxy"));
- return new ClockProxy.fromEndpoint(endpoint);
- }
-
- String get serviceName => Clock.serviceName;
-
- Future close({bool immediate: false}) => impl.close(immediate: immediate);
-
- Future responseOrError(Future f) => impl.responseOrError(f);
-
- Future get errorFuture => impl.errorFuture;
-
- int get version => impl.version;
-
- Future<int> queryVersion() => impl.queryVersion();
-
- void requireVersion(int requiredVersion) {
- impl.requireVersion(requiredVersion);
- }
-
- String toString() {
- return "ClockProxy($impl)";
- }
-}
-
-
-class ClockStub extends bindings.Stub {
- Clock _impl = null;
-
- ClockStub.fromEndpoint(
- core.MojoMessagePipeEndpoint endpoint, [this._impl])
- : super.fromEndpoint(endpoint);
-
- ClockStub.fromHandle(core.MojoHandle handle, [this._impl])
- : super.fromHandle(handle);
-
- ClockStub.unbound() : super.unbound();
-
- static ClockStub newFromEndpoint(
- core.MojoMessagePipeEndpoint endpoint) {
- assert(endpoint.setDescription("For ClockStub"));
- return new ClockStub.fromEndpoint(endpoint);
- }
-
-
-
- dynamic handleMessage(bindings.ServiceMessage message) {
- if (bindings.ControlMessageHandler.isControlMessage(message)) {
- return bindings.ControlMessageHandler.handleMessage(this,
- 0,
- message);
- }
- assert(_impl != null);
- switch (message.header.type) {
- default:
- throw new bindings.MojoCodecError("Unexpected message name");
- break;
- }
- return null;
- }
-
- Clock get impl => _impl;
- set impl(Clock d) {
- assert(_impl == null);
- _impl = d;
- }
-
- String toString() {
- var superString = super.toString();
- return "ClockStub($superString)";
- }
-
- int get version => 0;
-
- static service_describer.ServiceDescription _cachedServiceDescription;
- static service_describer.ServiceDescription get serviceDescription {
- if (_cachedServiceDescription == null) {
- _cachedServiceDescription = new _ClockServiceDescription();
- }
- return _cachedServiceDescription;
- }
-}
-
-
-
« no previous file with comments | « mojo/dart/packages/mojo_services/BUILD.gn ('k') | mojo/dart/packages/mojo_services/lib/mojo/media/media_sink.mojom.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698