Actually return a SemanticsServer service.

This commit is contained in:
Hixie 2016-02-02 13:31:49 -08:00
parent 687ff57e24
commit cca1cb2fa1
2 changed files with 4 additions and 3 deletions

View File

@ -68,7 +68,8 @@ abstract class Renderer extends Object with Scheduler, MojoShell
void initSemantics() {
SemanticsNode.onSemanticsEnabled = renderView.scheduleInitialSemantics;
provideService(mojom.SemanticsServer.serviceName, (core.MojoMessagePipeEndpoint endpoint) {
return new SemanticsServer();
mojom.SemanticsServerStub server = new mojom.SemanticsServerStub.fromEndpoint(endpoint);
server.impl = new SemanticsServer();
});
}

View File

@ -439,8 +439,8 @@ class SemanticsNode extends AbstractNode {
}
class SemanticsServer extends mojom.SemanticsServer {
void addSemanticsListener(mojom.SemanticsListener listener) {
SemanticsNode.addListener(listener);
void addSemanticsListener(mojom.SemanticsListenerProxy listener) {
SemanticsNode.addListener(listener.ptr);
}
void tap(int nodeID) {
SemanticsNode.getSemanticActionHandlerForId(nodeID, neededFlag: _SemanticFlags.canBeTapped)?.handleSemanticTap();