| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 /** @suppress {duplicate} */ | |
| 6 var remoting = remoting || {}; | |
| 7 | |
| 8 (function () { | |
| 9 | |
| 10 'use strict'; | |
| 11 | |
| 12 /** | |
| 13 * A struct that encapsulates the states of a remoting connection. It does not | |
| 14 * manage the lifetime of its constituents. | |
| 15 * | |
| 16 * @param {remoting.Host} host | |
| 17 * @param {remoting.CredentialsProvider} credentialsProvider | |
| 18 * @param {remoting.ClientSession} session | |
| 19 * @param {remoting.ClientPlugin} plugin | |
| 20 * | |
| 21 * @constructor | |
| 22 * @struct | |
| 23 */ | |
| 24 remoting.ConnectionInfo = function(host, credentialsProvider, session, plugin) { | |
| 25 /** @private */ | |
| 26 this.host_ = host; | |
| 27 /** @private */ | |
| 28 this.credentialsProvider_ = credentialsProvider; | |
| 29 /** @private */ | |
| 30 this.session_ = session; | |
| 31 /** @private */ | |
| 32 this.plugin_ = plugin; | |
| 33 }; | |
| 34 | |
| 35 /** @returns {remoting.Host} */ | |
| 36 remoting.ConnectionInfo.prototype.host = function() { | |
| 37 return this.host_; | |
| 38 }; | |
| 39 | |
| 40 /** @returns {remoting.CredentialsProvider} */ | |
| 41 remoting.ConnectionInfo.prototype.credentialsProvider = function() { | |
| 42 return this.credentialsProvider_; | |
| 43 }; | |
| 44 | |
| 45 /** @returns {remoting.ClientSession} */ | |
| 46 remoting.ConnectionInfo.prototype.session = function() { | |
| 47 return this.session_; | |
| 48 }; | |
| 49 | |
| 50 /** @returns {remoting.ClientPlugin} */ | |
| 51 remoting.ConnectionInfo.prototype.plugin = function() { | |
| 52 return this.plugin_; | |
| 53 }; | |
| 54 | |
| 55 })(); | |
| OLD | NEW |