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

Unified Diff: examples/dart/echo_client/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
« no previous file with comments | « benchmarks/mojo_rtt_benchmark/lib/echo_server.dart ('k') | examples/dart/wget/lib/main.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/dart/echo_client/lib/main.dart
diff --git a/examples/dart/echo_client/lib/main.dart b/examples/dart/echo_client/lib/main.dart
index 931513219a039ab640812bf97d82bdbb90a81167..02cffb04330b2d11d501be79b6b71e4df8011940 100644
--- a/examples/dart/echo_client/lib/main.dart
+++ b/examples/dart/echo_client/lib/main.dart
@@ -9,7 +9,7 @@ import 'package:mojo/core.dart';
import 'package:_mojo_for_test_only/mojo/examples/echo.mojom.dart';
class EchoClientApplication extends Application {
- final _echoProxy = new EchoProxy.unbound();
+ final EchoInterfaceRequest _echo = new EchoInterfaceRequest();
EchoClientApplication.fromHandle(MojoHandle handle)
: super.fromHandle(handle) {
@@ -22,15 +22,15 @@ class EchoClientApplication extends Application {
void initialize(List<String> arguments, String url) {
// See README.md for how to specify an alternate server on the command line.
final server = (arguments.length > 0) ? arguments[1] : "dart_echo_server";
- connectToService(url.replaceAll("dart_echo_client", server), _echoProxy);
+ connectToService(url.replaceAll("dart_echo_client", server), _echo);
- _echoProxy.echoString("hello world").then((response) {
+ _echo.echoString("hello world").then((response) {
print("${response.value}");
}).whenComplete(_closeHandles);
}
Future _closeHandles() async {
- await _echoProxy.close();
+ await _echo.close();
await close();
MojoHandle.reportLeakedHandles();
}
« no previous file with comments | « benchmarks/mojo_rtt_benchmark/lib/echo_server.dart ('k') | examples/dart/wget/lib/main.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698