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

Unified Diff: services/dart/test/echo/lib/main.dart

Issue 1545483003: Dart: Reorganize files (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix build file Created 5 years 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 | « services/dart/test/echo/BUILD.gn ('k') | services/dart/test/echo/pubspec.lock » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/dart/test/echo/lib/main.dart
diff --git a/services/dart/test/echo/lib/main.dart b/services/dart/test/echo/lib/main.dart
deleted file mode 100644
index 89b5712e52113acaa67096469f7054abbef5f0df..0000000000000000000000000000000000000000
--- a/services/dart/test/echo/lib/main.dart
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'dart:async';
-
-import 'package:mojo/application.dart';
-import 'package:mojo/bindings.dart';
-import 'package:mojo/core.dart';
-import 'package:_mojo_for_test_only/test/echo_service.mojom.dart';
-
-class EchoServiceImpl implements EchoService {
- EchoServiceStub _stub;
- Application _application;
-
- EchoServiceImpl(this._application, MojoMessagePipeEndpoint endpoint) {
- _stub = new EchoServiceStub.fromEndpoint(endpoint, this);
- }
-
- dynamic echoString(String value, [Function responseFactory]) {
- if (value == "quit") {
- _stub.close();
- }
- return responseFactory(value);
- }
-
- dynamic delayedEchoString(String value, int millis,
- [Function responseFactory]) {
- if (value == "quit") {
- _stub.close();
- }
- return new Future.delayed(
- new Duration(milliseconds: millis), () => responseFactory(value));
- }
-}
-
-class EchoApplication extends Application {
- EchoApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle);
-
- @override
- void acceptConnection(String requestorUrl, String resolvedUrl,
- ApplicationConnection connection) {
- connection.provideService(
- EchoService.serviceName, (endpoint) => new EchoServiceImpl(this, endpoint));
- }
-}
-
-main(List args) {
- MojoHandle appHandle = new MojoHandle(args[0]);
- String url = args[1];
- new EchoApplication.fromHandle(appHandle)
- ..onError = ((_) {
- MojoHandle.reportLeakedHandles();
- });
-}
« no previous file with comments | « services/dart/test/echo/BUILD.gn ('k') | services/dart/test/echo/pubspec.lock » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698