Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(550)

Unified Diff: remoting/webapp/crd/js/connection_info.js

Issue 1010053002: [Webapp Refactor] Implements remoting.ConnectionInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's feedback Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/base/js/application.js ('k') | remoting/webapp/crd/js/desktop_remoting.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/connection_info.js
diff --git a/remoting/webapp/crd/js/connection_info.js b/remoting/webapp/crd/js/connection_info.js
new file mode 100644
index 0000000000000000000000000000000000000000..c5928e91b0d3061f9953f170f90049de5b3f60a2
--- /dev/null
+++ b/remoting/webapp/crd/js/connection_info.js
@@ -0,0 +1,66 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/** @suppress {duplicate} */
+var remoting = remoting || {};
+
+(function () {
+
+'use strict';
+
+/**
+ * A struct that encapsulates the states of a remoting connection. It does not
+ * manage the lifetime of its constituents.
+ *
+ * @param {remoting.Host} host
+ * @param {remoting.CredentialsProvider} credentialsProvider
+ * @param {remoting.ClientSession} session
+ * @param {remoting.ClientPlugin} plugin
+ * @param {remoting.DesktopConnectedView.Mode} mode
+ *
+ * @constructor
+ * @struct
+ */
+remoting.ConnectionInfo =
+ function(host, credentialsProvider, session, plugin, mode) {
+ /** @private */
+ this.host_ = host;
+ /** @private */
+ this.credentialsProvider_ = credentialsProvider;
+ /** @private */
+ this.session_ = session;
+ /** @private */
+ this.plugin_ = plugin;
+ /** @private */
+ // TODO(kelvinp): Remove this when Me2Me and It2Me are abstracted into its
+ // own flow objects.
+ this.mode_ = mode;
+};
+
+/** @returns {remoting.Host} */
+remoting.ConnectionInfo.prototype.host = function() {
+ return this.host_;
+};
+
+/** @returns {remoting.CredentialsProvider} */
+remoting.ConnectionInfo.prototype.credentialsProvider = function() {
+ return this.credentialsProvider_;
+};
+
+/** @returns {remoting.ClientSession} */
+remoting.ConnectionInfo.prototype.session = function() {
+ return this.session_;
+};
+
+/** @returns {remoting.ClientPlugin} */
+remoting.ConnectionInfo.prototype.plugin = function() {
+ return this.plugin_;
+};
+
+/** @returns {remoting.DesktopConnectedView.Mode} */
+remoting.ConnectionInfo.prototype.mode = function() {
+ return this.mode_;
+};
+
+})();
« no previous file with comments | « remoting/webapp/base/js/application.js ('k') | remoting/webapp/crd/js/desktop_remoting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698