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

Unified Diff: examples/dart/console_example/main.dart

Issue 959993002: Dart: Removes name conflicts from generated bindings. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Removes unused constructors Created 5 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 side-by-side diff with in-line comments
Download patch
Index: examples/dart/console_example/main.dart
diff --git a/examples/dart/console_example/main.dart b/examples/dart/console_example/main.dart
index 70b367119fee1b81257339eaf58bcac72f87e355..9e04850a008f9e437ca62ceefac8f051f71c1ccd 100644
--- a/examples/dart/console_example/main.dart
+++ b/examples/dart/console_example/main.dart
@@ -10,27 +10,26 @@ import 'mojo:core';
import 'package:mojo/services/console/public/interfaces/console.mojom.dart';
class ConsoleApplication extends Application {
- ConsoleProxy _proxy;
+ ConsoleProxy _console;
ConsoleApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle);
void initialize(List<String> args, String url) {
- _proxy = new ConsoleProxy.unbound();
- connectToService("mojo:console", _proxy);
+ _console = new ConsoleProxy.unbound();
+ connectToService("mojo:console", _console);
run();
}
run() async {
- var result = await _proxy.readLine();
- await _proxy.printLines([result.line]);
+ var result = await _console.ptr.readLine();
+ await _console.ptr.printLines([result.line]);
- _proxy.close();
+ _console.close();
close();
}
}
main(List args) {
var appHandle = new MojoHandle(args[0]);
- var consoleApplication = new ConsoleApplication.fromHandle(appHandle);
- consoleApplication.listen();
+ new ConsoleApplication.fromHandle(appHandle);
}

Powered by Google App Engine
This is Rietveld 408576698