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

Unified Diff: mojo/dart/apptests/test_apps/pingpong_target/lib/main.dart

Issue 1998433002: Dart: Adds Interface and InterfaceRequest interfaces. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 4 years, 7 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/apptests/test_apps/pingpong_target/lib/main.dart
diff --git a/mojo/dart/apptests/test_apps/pingpong_target/lib/main.dart b/mojo/dart/apptests/test_apps/pingpong_target/lib/main.dart
index 4f35f9b1d217a1c381eaf453945e78ef9fa71455..b82ade9fbaa77031298264b073fbcb352858d0a9 100644
--- a/mojo/dart/apptests/test_apps/pingpong_target/lib/main.dart
+++ b/mojo/dart/apptests/test_apps/pingpong_target/lib/main.dart
@@ -11,21 +11,23 @@ import 'package:mojo/core.dart';
import 'package:_mojo_for_test_only/test/pingpong_service.mojom.dart';
class PingPongServiceImpl implements PingPongService {
- PingPongServiceStub _stub;
+ PingPongService _service;
Application _application;
- PingPongClientProxy _pingPongClient;
+ PingPongClient _pingPongClient;
PingPongServiceImpl(this._application, MojoMessagePipeEndpoint endpoint) {
- _stub = new PingPongServiceStub.fromEndpoint(endpoint, this);
+ _service = new PingPongServiceInterface.fromEndpoint(endpoint, this);
}
- PingPongServiceImpl.fromStub(this._stub) {
- _stub.impl = this;
+ PingPongServiceImpl.fromInterfaceRequest(
+ PingPongServiceInterfaceRequest service) {
+ service.impl = this;
+ _service = service;
}
- void setClient(Proxy proxy) {
+ void setClient(PingPongClientInterface client) {
assert(_pingPongClient == null);
- _pingPongClient = proxy;
+ _pingPongClient = client;
}
void ping(int pingValue) => _pingPongClient.pong(pingValue + 1);
@@ -33,15 +35,15 @@ class PingPongServiceImpl implements PingPongService {
// These methods are unimplemented; they merely throw on invocation.
dynamic pingTargetUrl(String url, int count, [Function responseFactory]) =>
throw "Unimplemented";
- dynamic pingTargetService(
- Object service, int count, [Function responseFactory]) =>
+ dynamic pingTargetService(PingPongServiceInterface service, int count,
+ [Function responseFactory]) =>
throw "Unimplemented";
- dynamic getPingPongServiceDelayed(
- Object service, [Function responseFactory]) =>
+ dynamic getPingPongServiceDelayed(PingPongServiceInterfaceRequest service,
+ [Function responseFactory]) =>
throw "Unimplemented";
- void getPingPongService(Object service) {
- new PingPongServiceImpl.fromStub(service);
+ void getPingPongService(PingPongServiceInterfaceRequest service) {
+ new PingPongServiceImpl.fromInterfaceRequest(service);
}
void quit() {}

Powered by Google App Engine
This is Rietveld 408576698