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

Side by Side Diff: mojo/dart/packages/mojo_services/lib/mojo/ui/input_dispatcher.mojom.dart

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Merge with master Created 4 years, 10 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 input_dispatcher_mojom; 5 library input_dispatcher_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 import 'package:mojo_services/mojo/input_events.mojom.dart' as input_events_mojo m; 13 import 'package:mojo_services/mojo/input_events.mojom.dart' as input_events_mojo m;
12 14
13 15
14 16
15 class _InputDispatcherDispatchEventParams extends bindings.Struct { 17 class _InputDispatcherDispatchEventParams extends bindings.Struct {
16 static const List<bindings.StructDataHeader> kVersions = const [ 18 static const List<bindings.StructDataHeader> kVersions = const [
17 const bindings.StructDataHeader(16, 0) 19 const bindings.StructDataHeader(16, 0)
18 ]; 20 ];
19 input_events_mojom.Event event = null; 21 input_events_mojom.Event event = null;
20 22
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 "event: $event" ")"; 74 "event: $event" ")";
73 } 75 }
74 76
75 Map toJson() { 77 Map toJson() {
76 Map map = new Map(); 78 Map map = new Map();
77 map["event"] = event; 79 map["event"] = event;
78 return map; 80 return map;
79 } 81 }
80 } 82 }
81 83
84
85
86
82 const int _InputDispatcher_dispatchEventName = 0; 87 const int _InputDispatcher_dispatchEventName = 0;
83 88
89
90
91 class _InputDispatcherServiceDescription implements service_describer.ServiceDes cription {
92 dynamic getTopLevelInterface([Function responseFactory]) => null;
93
94 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null;
95
96 dynamic getAllTypeDefinitions([Function responseFactory]) => null;
97 }
98
84 abstract class InputDispatcher { 99 abstract class InputDispatcher {
85 static const String serviceName = "mojo::ui::InputDispatcher"; 100 static const String serviceName = "mojo::ui::InputDispatcher";
86 void dispatchEvent(input_events_mojom.Event event); 101 void dispatchEvent(input_events_mojom.Event event);
87 } 102 }
88 103
89 104
90 class _InputDispatcherProxyImpl extends bindings.Proxy { 105 class _InputDispatcherProxyImpl extends bindings.Proxy {
91 _InputDispatcherProxyImpl.fromEndpoint( 106 _InputDispatcherProxyImpl.fromEndpoint(
92 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 107 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
93 108
94 _InputDispatcherProxyImpl.fromHandle(core.MojoHandle handle) : 109 _InputDispatcherProxyImpl.fromHandle(core.MojoHandle handle) :
95 super.fromHandle(handle); 110 super.fromHandle(handle);
96 111
97 _InputDispatcherProxyImpl.unbound() : super.unbound(); 112 _InputDispatcherProxyImpl.unbound() : super.unbound();
98 113
99 static _InputDispatcherProxyImpl newFromEndpoint( 114 static _InputDispatcherProxyImpl newFromEndpoint(
100 core.MojoMessagePipeEndpoint endpoint) { 115 core.MojoMessagePipeEndpoint endpoint) {
101 assert(endpoint.setDescription("For _InputDispatcherProxyImpl")); 116 assert(endpoint.setDescription("For _InputDispatcherProxyImpl"));
102 return new _InputDispatcherProxyImpl.fromEndpoint(endpoint); 117 return new _InputDispatcherProxyImpl.fromEndpoint(endpoint);
103 } 118 }
104 119
120 service_describer.ServiceDescription get serviceDescription =>
121 new _InputDispatcherServiceDescription();
122
105 void handleResponse(bindings.ServiceMessage message) { 123 void handleResponse(bindings.ServiceMessage message) {
106 switch (message.header.type) { 124 switch (message.header.type) {
107 default: 125 default:
108 proxyError("Unexpected message type: ${message.header.type}"); 126 proxyError("Unexpected message type: ${message.header.type}");
109 close(immediate: true); 127 close(immediate: true);
110 break; 128 break;
111 } 129 }
112 } 130 }
113 131
114 String toString() { 132 String toString() {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 assert(_impl == null); 256 assert(_impl == null);
239 _impl = d; 257 _impl = d;
240 } 258 }
241 259
242 String toString() { 260 String toString() {
243 var superString = super.toString(); 261 var superString = super.toString();
244 return "InputDispatcherStub($superString)"; 262 return "InputDispatcherStub($superString)";
245 } 263 }
246 264
247 int get version => 0; 265 int get version => 0;
266
267 service_describer.ServiceDescription get serviceDescription =>
268 new _InputDispatcherServiceDescription();
248 } 269 }
249 270
250 271
272
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698