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

Unified Diff: services/dart/test/pingpong_target/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/pingpong_target/BUILD.gn ('k') | services/dart/test/pingpong_target/pubspec.lock » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/dart/test/pingpong_target/lib/main.dart
diff --git a/services/dart/test/pingpong_target/lib/main.dart b/services/dart/test/pingpong_target/lib/main.dart
deleted file mode 100644
index 752005b65cb34a679ff31cdff39def5f0f35c148..0000000000000000000000000000000000000000
--- a/services/dart/test/pingpong_target/lib/main.dart
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2015 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/pingpong_service.mojom.dart';
-
-class PingPongServiceImpl implements PingPongService {
- PingPongServiceStub _stub;
- Application _application;
- PingPongClientProxy _pingPongClient;
-
- PingPongServiceImpl(this._application, MojoMessagePipeEndpoint endpoint) {
- _stub = new PingPongServiceStub.fromEndpoint(endpoint, this);
- }
-
- void setClient(ProxyBase proxyBase) {
- assert(_pingPongClient == null);
- _pingPongClient = proxyBase;
- }
-
- void ping(int pingValue) => _pingPongClient.ptr.pong(pingValue + 1);
-
- // 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]) =>
- throw "Unimplemented";
- void getPingPongService(Object service) => throw "Unimplemented";
-
- void quit() {
- if (_pingPongClient != null) {
- _pingPongClient.close();
- _pingPongClient = null;
- }
- _stub.close();
- }
-}
-
-class PingPongApplication extends Application {
- PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle);
-
- @override
- void acceptConnection(String requestorUrl, String resolvedUrl,
- ApplicationConnection connection) {
- connection.provideService(PingPongService.serviceName,
- (endpoint) => new PingPongServiceImpl(this, endpoint));
- // Close the application when the first connection goes down.
- connection.onError = ((_) => closeApplication());
- }
-
- Future closeApplication() async {
- await close();
- MojoHandle.reportLeakedHandles();
- }
-}
-
-main(List args) {
- MojoHandle appHandle = new MojoHandle(args[0]);
- String url = args[1];
- new PingPongApplication.fromHandle(appHandle);
-}
« no previous file with comments | « services/dart/test/pingpong_target/BUILD.gn ('k') | services/dart/test/pingpong_target/pubspec.lock » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698