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

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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 }; 68 };
69 69
70 /** 70 /**
71 * Reset the per-connection state so that the object can be re-used for a 71 * Reset the per-connection state so that the object can be re-used for a
72 * second connection. Note the none of the shared WCS state is reset. 72 * second connection. Note the none of the shared WCS state is reset.
73 * @private 73 * @private
74 */ 74 */
75 remoting.SessionConnectorImpl.prototype.resetConnection_ = function() { 75 remoting.SessionConnectorImpl.prototype.resetConnection_ = function() {
76 this.closeSession(); 76 this.closeSession();
77 77
78 // It's OK to initialize these member variables here because the
79 // constructor calls this method.
80
78 /** @private {remoting.Host} */ 81 /** @private {remoting.Host} */
79 this.host_ = null; 82 this.host_ = null;
80 83
81 /** @private {boolean} */ 84 /** @private {boolean} */
82 this.logHostOfflineErrors_ = false; 85 this.logHostOfflineErrors_ = false;
83 86
84 /** @private {remoting.ClientPlugin} */ 87 /** @private {remoting.ClientPlugin} */
85 this.plugin_ = null; 88 this.plugin_ = null;
86 89
87 /** @private {remoting.ClientSession} */ 90 /** @private {remoting.ClientSession} */
88 this.clientSession_ = null; 91 this.clientSession_ = null;
89 92
90 /** @private {XMLHttpRequest} */
91 this.pendingXhr_ = null;
92 93
93 /** @private {remoting.CredentialsProvider} */ 94 /** @private {remoting.CredentialsProvider} */
94 this.credentialsProvider_ = null; 95 this.credentialsProvider_ = null;
95 96
96 /** @private {Object<string,remoting.ProtocolExtension>} */ 97 /** @private {Object<string,remoting.ProtocolExtension>} */
97 this.protocolExtensions_ = {}; 98 this.protocolExtensions_ = {};
98 99
99 /** 100 /**
100 * True once a session has been created and we've started the extensions. 101 * True once a session has been created and we've started the extensions.
101 * This is used to immediately start any extensions that are registered 102 * This is used to immediately start any extensions that are registered
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 * @return {remoting.SessionConnector} 553 * @return {remoting.SessionConnector}
553 */ 554 */
554 remoting.DefaultSessionConnectorFactory.prototype.createConnector = 555 remoting.DefaultSessionConnectorFactory.prototype.createConnector =
555 function(clientContainer, onConnected, onError, 556 function(clientContainer, onConnected, onError,
556 onConnectionFailed, requiredCapabilities) { 557 onConnectionFailed, requiredCapabilities) {
557 return new remoting.SessionConnectorImpl(clientContainer, onConnected, 558 return new remoting.SessionConnectorImpl(clientContainer, onConnected,
558 onError, 559 onError,
559 onConnectionFailed, 560 onConnectionFailed,
560 requiredCapabilities); 561 requiredCapabilities);
561 }; 562 };
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/oauth2_api_impl.js ('k') | remoting/webapp/crd/js/third_party_token_fetcher.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698