| 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 * @param {remoting.DesktopConnectedView.Mode} mode |
| 21 * |
| 22 * @constructor |
| 23 * @struct |
| 24 */ |
| 25 remoting.ConnectionInfo = |
| 26 function(host, credentialsProvider, session, plugin, mode) { |
| 27 /** @private */ |
| 28 this.host_ = host; |
| 29 /** @private */ |
| 30 this.credentialsProvider_ = credentialsProvider; |
| 31 /** @private */ |
| 32 this.session_ = session; |
| 33 /** @private */ |
| 34 this.plugin_ = plugin; |
| 35 /** @private */ |
| 36 // TODO(kelvinp): Remove this when Me2Me and It2Me are abstracted into its |
| 37 // own flow objects. |
| 38 this.mode_ = mode; |
| 39 }; |
| 40 |
| 41 /** @returns {remoting.Host} */ |
| 42 remoting.ConnectionInfo.prototype.host = function() { |
| 43 return this.host_; |
| 44 }; |
| 45 |
| 46 /** @returns {remoting.CredentialsProvider} */ |
| 47 remoting.ConnectionInfo.prototype.credentialsProvider = function() { |
| 48 return this.credentialsProvider_; |
| 49 }; |
| 50 |
| 51 /** @returns {remoting.ClientSession} */ |
| 52 remoting.ConnectionInfo.prototype.session = function() { |
| 53 return this.session_; |
| 54 }; |
| 55 |
| 56 /** @returns {remoting.ClientPlugin} */ |
| 57 remoting.ConnectionInfo.prototype.plugin = function() { |
| 58 return this.plugin_; |
| 59 }; |
| 60 |
| 61 /** @returns {remoting.DesktopConnectedView.Mode} */ |
| 62 remoting.ConnectionInfo.prototype.mode = function() { |
| 63 return this.mode_; |
| 64 }; |
| 65 |
| 66 })(); |
| OLD | NEW |