| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * Class to communicate with the It2me Host component via Native Messaging. | 7 * Class to communicate with the It2me Host component via Native Messaging. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| 11 | 11 |
| 12 /** @suppress {duplicate} */ | 12 /** @suppress {duplicate} */ |
| 13 var remoting = remoting || {}; | 13 var remoting = remoting || {}; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * @constructor | 16 * @constructor |
| 17 */ | 17 */ |
| 18 remoting.It2MeHostFacade = function() { | 18 remoting.It2MeHostFacade = function() { |
| 19 /** | 19 /** |
| 20 * @type {number} | 20 * @type {number} |
| 21 * @private | 21 * @private |
| 22 */ | 22 */ |
| 23 this.nextId_ = 0; | 23 this.nextId_ = 0; |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * @type {?chrome.extension.Port} | 26 * @type {?chrome.runtime.Port} |
| 27 * @private | 27 * @private |
| 28 */ | 28 */ |
| 29 this.port_ = null; | 29 this.port_ = null; |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * @type {string} | 32 * @type {string} |
| 33 * @private | 33 * @private |
| 34 */ | 34 */ |
| 35 this.accessCode_ = ''; | 35 this.accessCode_ = ''; |
| 36 | 36 |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 // error. | 293 // error. |
| 294 console.log('Native Messaging initialization failed: ' + | 294 console.log('Native Messaging initialization failed: ' + |
| 295 chrome.runtime.lastError.message); | 295 chrome.runtime.lastError.message); |
| 296 this.onInitializationFailed_(); | 296 this.onInitializationFailed_(); |
| 297 } else { | 297 } else { |
| 298 console.error('Native Messaging port disconnected.'); | 298 console.error('Native Messaging port disconnected.'); |
| 299 this.port_ = null; | 299 this.port_ = null; |
| 300 this.onError_(remoting.Error.UNEXPECTED); | 300 this.onError_(remoting.Error.UNEXPECTED); |
| 301 } | 301 } |
| 302 } | 302 } |
| OLD | NEW |