OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** @suppress {duplicate} */ | 7 /** @suppress {duplicate} */ |
8 var remoting = remoting || {}; | 8 var remoting = remoting || {}; |
9 | 9 |
10 /** | 10 /** |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 /** | 151 /** |
152 * Show the dialog in order to get a PIN prior to starting the daemon. When the | 152 * Show the dialog in order to get a PIN prior to starting the daemon. When the |
153 * user clicks OK, the dialog shows a spinner until the daemon has started. | 153 * user clicks OK, the dialog shows a spinner until the daemon has started. |
154 * | 154 * |
155 * @return {void} Nothing. | 155 * @return {void} Nothing. |
156 */ | 156 */ |
157 remoting.HostSetupDialog.prototype.showForStart = function() { | 157 remoting.HostSetupDialog.prototype.showForStart = function() { |
158 // Although we don't need an access token in order to start the host, | 158 // Although we don't need an access token in order to start the host, |
159 // using callWithToken here ensures consistent error handling in the | 159 // using callWithToken here ensures consistent error handling in the |
160 // case where the refresh token is invalid. | 160 // case where the refresh token is invalid. |
161 remoting.oauth2.callWithToken(this.showForStartWithToken_.bind(this), | 161 remoting.identity.callWithToken(this.showForStartWithToken_.bind(this), |
162 remoting.showErrorMessage); | 162 remoting.showErrorMessage); |
163 }; | 163 }; |
164 | 164 |
165 /** | 165 /** |
166 * @param {string} token The OAuth2 token. | 166 * @param {string} token The OAuth2 token. |
167 * @private | 167 * @private |
168 */ | 168 */ |
169 remoting.HostSetupDialog.prototype.showForStartWithToken_ = function(token) { | 169 remoting.HostSetupDialog.prototype.showForStartWithToken_ = function(token) { |
170 /** @type {remoting.HostSetupDialog} */ | 170 /** @type {remoting.HostSetupDialog} */ |
171 var that = this; | 171 var that = this; |
172 | 172 |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 | 467 |
468 /** | 468 /** |
469 * @return {void} Nothing. | 469 * @return {void} Nothing. |
470 */ | 470 */ |
471 remoting.HostSetupDialog.prototype.onInstallDialogRetry = function() { | 471 remoting.HostSetupDialog.prototype.onInstallDialogRetry = function() { |
472 remoting.setMode(remoting.AppMode.HOST_SETUP_INSTALL); | 472 remoting.setMode(remoting.AppMode.HOST_SETUP_INSTALL); |
473 }; | 473 }; |
474 | 474 |
475 /** @type {remoting.HostSetupDialog} */ | 475 /** @type {remoting.HostSetupDialog} */ |
476 remoting.hostSetupDialog = null; | 476 remoting.hostSetupDialog = null; |
OLD | NEW |