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

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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 }; 88 };
89 89
90 /** 90 /**
91 * Reset the per-connection state so that the object can be re-used for a 91 * Reset the per-connection state so that the object can be re-used for a
92 * second connection. Note the none of the shared WCS state is reset. 92 * second connection. Note the none of the shared WCS state is reset.
93 * @private 93 * @private
94 */ 94 */
95 remoting.SessionConnectorImpl.prototype.resetConnection_ = function() { 95 remoting.SessionConnectorImpl.prototype.resetConnection_ = function() {
96 this.removePlugin_(); 96 this.removePlugin_();
97 97
98 // TODO(jrw): Why are there member variables "declared" here??
Jamie 2015/03/16 18:06:34 IIRC, since this code would otherwise be duplicate
John Williams 2015/03/16 23:15:00 Done.
99
98 /** @private {remoting.Host} */ 100 /** @private {remoting.Host} */
99 this.host_ = null; 101 this.host_ = null;
100 102
101 /** @private {boolean} */ 103 /** @private {boolean} */
102 this.logHostOfflineErrors_ = false; 104 this.logHostOfflineErrors_ = false;
103 105
104 /** @private {remoting.ClientPlugin} */ 106 /** @private {remoting.ClientPlugin} */
105 this.plugin_ = null; 107 this.plugin_ = null;
106 108
107 /** @private {remoting.ClientSession} */ 109 /** @private {remoting.ClientSession} */
108 this.clientSession_ = null; 110 this.clientSession_ = null;
109 111
110 /** @private {remoting.DesktopConnectedView} */ 112 /** @private {remoting.DesktopConnectedView} */
111 this.connectedView_ = null; 113 this.connectedView_ = null;
112 114
113 /** @private {XMLHttpRequest} */
114 this.pendingXhr_ = null;
115
116 /** @private {remoting.CredentialsProvider} */ 115 /** @private {remoting.CredentialsProvider} */
117 this.credentialsProvider_ = null; 116 this.credentialsProvider_ = null;
118 117
119 /** @private {Object<string,remoting.ProtocolExtension>} */ 118 /** @private {Object<string,remoting.ProtocolExtension>} */
120 this.protocolExtensions_ = {}; 119 this.protocolExtensions_ = {};
121 }; 120 };
122 121
123 /** 122 /**
124 * Initiate a Me2Me connection. 123 * Initiate a Me2Me connection.
125 * 124 *
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 function(clientContainer, onConnected, onError, 553 function(clientContainer, onConnected, onError,
555 appProtocolExtensionHandler, 554 appProtocolExtensionHandler,
556 onConnectionFailed, requiredCapabilities, defaultRemapKeys) { 555 onConnectionFailed, requiredCapabilities, defaultRemapKeys) {
557 return new remoting.SessionConnectorImpl(clientContainer, onConnected, 556 return new remoting.SessionConnectorImpl(clientContainer, onConnected,
558 onError, 557 onError,
559 appProtocolExtensionHandler, 558 appProtocolExtensionHandler,
560 onConnectionFailed, 559 onConnectionFailed,
561 requiredCapabilities, 560 requiredCapabilities,
562 defaultRemapKeys); 561 defaultRemapKeys);
563 }; 562 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698