| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 define([ | 5 define([ |
| 6 "console", |
| 6 "mojo/apps/js/bindings/codec", | 7 "mojo/apps/js/bindings/codec", |
| 7 "mojo/apps/js/bindings/core", | 8 "mojo/apps/js/bindings/core", |
| 8 "mojo/apps/js/bindings/support", | 9 "mojo/apps/js/bindings/support", |
| 9 ], function(codec, core, support) { | 10 ], function(console, codec, core, support) { |
| 10 | 11 |
| 11 function Connector(handle) { | 12 function Connector(handle) { |
| 12 this.handle_ = handle; | 13 this.handle_ = handle; |
| 13 this.error_ = false; | 14 this.error_ = false; |
| 14 this.incomingReceiver_ = null; | 15 this.incomingReceiver_ = null; |
| 15 this.readWaitCookie_ = null; | 16 this.readWaitCookie_ = null; |
| 16 } | 17 } |
| 17 | 18 |
| 18 Connector.prototype.close = function() { | 19 Connector.prototype.close = function() { |
| 19 if (this.readWaitCookie_) { | 20 if (this.readWaitCookie_) { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 this.connector_.close(); | 89 this.connector_.close(); |
| 89 this.connector_ = null; | 90 this.connector_ = null; |
| 90 this.local = null; | 91 this.local = null; |
| 91 this.remote = null; | 92 this.remote = null; |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 var exports = {}; | 95 var exports = {}; |
| 95 exports.Connection = Connection; | 96 exports.Connection = Connection; |
| 96 return exports; | 97 return exports; |
| 97 }); | 98 }); |
| OLD | NEW |