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

Side by Side Diff: samples/proxy/proxy.dart

Issue 9363064: move proxy out into sample/proxy (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/pond/editors_stub.dart ('k') | samples/tests/samples/src/proxy/MintMakerRpcTest.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 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library("proxy");
6
5 /** 7 /**
6 * Base class for all RpcProxy's 8 * Base class for all RpcProxy's
7 * 9 *
8 * RpcProxy objects run in the "client" isolate and have a SendPort which 10 * RpcProxy objects run in the "client" isolate and have a SendPort which
9 * they use to send messages to RpcReceiver objects running in a "service" 11 * they use to send messages to RpcReceiver objects running in a "service"
10 * isolate. 12 * isolate.
11 */ 13 */
12 14
13 class RpcProxy { 15 class RpcProxy {
14 final Future<SendPort> futurePort; 16 final Future<SendPort> futurePort;
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 if (object === null || !(object is String)) { 230 if (object === null || !(object is String)) {
229 return null; 231 return null;
230 } 232 }
231 String s = object; 233 String s = object;
232 if (!s.startsWith(prefix)) { 234 if (!s.startsWith(prefix)) {
233 return null; 235 return null;
234 } 236 }
235 return new RpcException(s.substring(prefix.length, s.length)); 237 return new RpcException(s.substring(prefix.length, s.length));
236 } 238 }
237 } 239 }
OLDNEW
« no previous file with comments | « samples/pond/editors_stub.dart ('k') | samples/tests/samples/src/proxy/MintMakerRpcTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698