Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / remoting / webapp / base / js / connection_info.js
blob3e6b82147551eb1a9487bdd8cfe153f80294d3ff
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.
5 /** @suppress {duplicate} */
6 var remoting = remoting || {};
8 (function () {
10 'use strict';
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;
35 /** @returns {remoting.Host} */
36 remoting.ConnectionInfo.prototype.host = function() {
37   return this.host_;
40 /** @returns {remoting.CredentialsProvider} */
41 remoting.ConnectionInfo.prototype.credentialsProvider = function() {
42   return this.credentialsProvider_;
45 /** @returns {remoting.ClientSession} */
46 remoting.ConnectionInfo.prototype.session = function() {
47   return this.session_;
50 /** @returns {remoting.ClientPlugin} */
51 remoting.ConnectionInfo.prototype.plugin = function() {
52   return this.plugin_;
55 })();