| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import "dart:collection" show HashMap; | 5 import "dart:collection" show HashMap; |
| 6 | 6 |
| 7 patch class ReceivePort { | 7 patch class ReceivePort { |
| 8 /* patch */ factory ReceivePort() = _ReceivePortImpl; | 8 /* patch */ factory ReceivePort() = _ReceivePortImpl; |
| 9 | 9 |
| 10 /* patch */ factory ReceivePort.fromRawReceivePort(RawReceivePort rawPort) = | 10 /* patch */ factory ReceivePort.fromRawReceivePort(RawReceivePort rawPort) = |
| 11 _ReceivePortImpl.fromRawReceivePort; | 11 _ReceivePortImpl.fromRawReceivePort; |
| 12 } | 12 } |
| 13 | 13 |
| 14 patch class Capability { | 14 patch class Capability { |
| 15 /* patch */ factory Capability() = _CapabilityImpl; | 15 /* patch */ factory Capability() = _CapabilityImpl; |
| 16 } | 16 } |
| 17 | 17 |
| 18 class _CapabilityImpl implements Capability { | 18 class _CapabilityImpl implements Capability { |
| 19 factory _CapabilityImpl() native "CapabilityImpl_factory"; | 19 factory _CapabilityImpl() native "CapabilityImpl_factory"; |
| 20 |
| 21 bool operator==(var other) { |
| 22 return (other is _CapabilityImpl) && _equals(other); |
| 23 } |
| 24 |
| 25 int get hashCode { |
| 26 return _get_hashcode(); |
| 27 } |
| 28 |
| 29 _equals(other) native "CapabilityImpl_equals"; |
| 30 _get_hashcode() native "CapabilityImpl_get_hashcode"; |
| 20 } | 31 } |
| 21 | 32 |
| 22 patch class RawReceivePort { | 33 patch class RawReceivePort { |
| 23 /** | 34 /** |
| 24 * Opens a long-lived port for receiving messages. | 35 * Opens a long-lived port for receiving messages. |
| 25 * | 36 * |
| 26 * A [RawReceivePort] is low level and does not work with [Zone]s. It | 37 * A [RawReceivePort] is low level and does not work with [Zone]s. It |
| 27 * can not be paused. The data-handler must be set before the first | 38 * can not be paused. The data-handler must be set before the first |
| 28 * event is received. | 39 * event is received. |
| 29 */ | 40 */ |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 } | 373 } |
| 363 | 374 |
| 364 /* patch */ void addErrorListener(SendPort port) { | 375 /* patch */ void addErrorListener(SendPort port) { |
| 365 throw new UnsupportedError("addErrorListener"); | 376 throw new UnsupportedError("addErrorListener"); |
| 366 } | 377 } |
| 367 | 378 |
| 368 /* patch */ void removeErrorListener(SendPort port) { | 379 /* patch */ void removeErrorListener(SendPort port) { |
| 369 throw new UnsupportedError("removeErrorListener"); | 380 throw new UnsupportedError("removeErrorListener"); |
| 370 } | 381 } |
| 371 } | 382 } |
| OLD | NEW |