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

Side by Side Diff: services/dart/test/pingpong.dart

Issue 878883002: Dart: Adjusts class Application for removal of Application/Shell Client= (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « services/dart/test/echo.dart ('k') | services/dart/test/pingpong_target.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!mojo mojo:dart_content_handler 1 #!mojo mojo:dart_content_handler
2 2
3 // Copyright 2015 The Chromium Authors. All rights reserved. 3 // Copyright 2015 The Chromium Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style license that can be 4 // Use of this source code is governed by a BSD-style license that can be
5 // found in the LICENSE file. 5 // found in the LICENSE file.
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:mojo_application'; 8 import 'dart:mojo_application';
9 import 'dart:mojo_bindings'; 9 import 'dart:mojo_bindings';
10 import 'dart:mojo_core'; 10 import 'dart:mojo_core';
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 getPingPongService(PingPongServiceStub stub) { 87 getPingPongService(PingPongServiceStub stub) {
88 stub.delegate = new PingPongServiceImpl.unbound(); 88 stub.delegate = new PingPongServiceImpl.unbound();
89 stub.listen(); 89 stub.listen();
90 } 90 }
91 91
92 void quit() { 92 void quit() {
93 if (_proxy != null) { 93 if (_proxy != null) {
94 _proxy.close(); 94 _proxy.close();
95 } 95 }
96 close(); 96 close();
97 if (_application != null) {
98 _application.close();
99 }
97 } 100 }
98 } 101 }
99 102
100 class PingPongApplication extends Application { 103 class PingPongApplication extends Application {
101 PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle); 104 PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle);
102 105
103 Function stubFactoryClosure() => 106 Function stubFactoryClosure() =>
104 (endpoint) => new PingPongServiceImpl(this, endpoint); 107 (endpoint) => new PingPongServiceImpl(this, endpoint);
105 } 108 }
106 109
107 main(List args) { 110 main(List args) {
108 MojoHandle shellHandle = new MojoHandle(args[0]); 111 MojoHandle appHandle = new MojoHandle(args[0]);
109 String url = args[1]; 112 String url = args[1];
110 var pingPongApplication = new PingPongApplication.fromHandle(shellHandle); 113 var pingPongApplication = new PingPongApplication.fromHandle(appHandle);
111 pingPongApplication.listen(); 114 pingPongApplication.listen();
112 } 115 }
OLDNEW
« no previous file with comments | « services/dart/test/echo.dart ('k') | services/dart/test/pingpong_target.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698