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

Side by Side Diff: remoting/webapp/crd/js/session_connector_impl.js

Issue 1003433002: Updated remoting.xhr API to use promises. Removed access to the native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@spy-promise
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 * Connect set-up state machine for Me2Me and IT2Me 7 * Connect set-up state machine for Me2Me and IT2Me
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 }; 81 };
82 82
83 /** 83 /**
84 * Reset the per-connection state so that the object can be re-used for a 84 * Reset the per-connection state so that the object can be re-used for a
85 * second connection. Note the none of the shared WCS state is reset. 85 * second connection. Note the none of the shared WCS state is reset.
86 * @private 86 * @private
87 */ 87 */
88 remoting.SessionConnectorImpl.prototype.resetConnection_ = function() { 88 remoting.SessionConnectorImpl.prototype.resetConnection_ = function() {
89 this.removePlugin_(); 89 this.removePlugin_();
90 90
91 // It's OK to initialize these member variables here because the
92 // constructor calls this method.
93
91 /** @private {remoting.Host} */ 94 /** @private {remoting.Host} */
92 this.host_ = null; 95 this.host_ = null;
93 96
94 /** @private {boolean} */ 97 /** @private {boolean} */
95 this.logHostOfflineErrors_ = false; 98 this.logHostOfflineErrors_ = false;
96 99
97 /** @private {remoting.ClientPlugin} */ 100 /** @private {remoting.ClientPlugin} */
98 this.plugin_ = null; 101 this.plugin_ = null;
99 102
100 /** @private {remoting.ClientSession} */ 103 /** @private {remoting.ClientSession} */
101 this.clientSession_ = null; 104 this.clientSession_ = null;
102 105
103 /** @private {remoting.DesktopConnectedView} */ 106 /** @private {remoting.DesktopConnectedView} */
104 this.connectedView_ = null; 107 this.connectedView_ = null;
105 108
106 /** @private {XMLHttpRequest} */
107 this.pendingXhr_ = null;
108
109 /** @private {remoting.CredentialsProvider} */ 109 /** @private {remoting.CredentialsProvider} */
110 this.credentialsProvider_ = null; 110 this.credentialsProvider_ = null;
111 111
112 /** @private {Object<string,remoting.ProtocolExtension>} */ 112 /** @private {Object<string,remoting.ProtocolExtension>} */
113 this.protocolExtensions_ = {}; 113 this.protocolExtensions_ = {};
114 114
115 /** 115 /**
116 * True once a session has been created and we've started the extensions. 116 * True once a session has been created and we've started the extensions.
117 * This is used to immediately start any extensions that are registered 117 * This is used to immediately start any extensions that are registered
118 * after the CONNECTED state change. 118 * after the CONNECTED state change.
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 */ 587 */
588 remoting.DefaultSessionConnectorFactory.prototype.createConnector = 588 remoting.DefaultSessionConnectorFactory.prototype.createConnector =
589 function(clientContainer, onConnected, onError, 589 function(clientContainer, onConnected, onError,
590 onConnectionFailed, requiredCapabilities, defaultRemapKeys) { 590 onConnectionFailed, requiredCapabilities, defaultRemapKeys) {
591 return new remoting.SessionConnectorImpl(clientContainer, onConnected, 591 return new remoting.SessionConnectorImpl(clientContainer, onConnected,
592 onError, 592 onError,
593 onConnectionFailed, 593 onConnectionFailed,
594 requiredCapabilities, 594 requiredCapabilities,
595 defaultRemapKeys); 595 defaultRemapKeys);
596 }; 596 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698