| Index: remoting/webapp/client_screen.js
|
| diff --git a/remoting/webapp/client_screen.js b/remoting/webapp/client_screen.js
|
| index 77ff7ecbf07e14ab1ba9ea027e16da85b75b23f0..04a308e42faf3bed35f4613ba1bbc9e84b9d1b85 100644
|
| --- a/remoting/webapp/client_screen.js
|
| +++ b/remoting/webapp/client_screen.js
|
| @@ -251,6 +251,19 @@ remoting.connectMe2MeHostVersionAcknowledged_ = function(host) {
|
| }
|
| remoting.setMode(remoting.AppMode.CLIENT_CONNECTING);
|
|
|
| +/**
|
| + * @param {string} tokenUrl Token-issue URL received from the host.
|
| + * @param {string} scope OAuth scope to request the token for.
|
| + * @param {function(string, string):void} onThirdPartyTokenFetched Callback.
|
| + */
|
| + var fetchThirdPartyToken = function(
|
| + tokenUrl, hostPublicKey, scope, onThirdPartyTokenFetched) {
|
| + var thirdPartyTokenFetcher = new remoting.ThirdPartyTokenFetcher(
|
| + tokenUrl, hostPublicKey, scope, host.tokenUrlPatterns,
|
| + onThirdPartyTokenFetched);
|
| + thirdPartyTokenFetcher.fetchToken();
|
| + };
|
| +
|
| /** @param {function(string):void} onPinFetched */
|
| var requestPin = function(onPinFetched) {
|
| /** @type {Element} */
|
| @@ -286,7 +299,7 @@ remoting.connectMe2MeHostVersionAcknowledged_ = function(host) {
|
| l10n.localizeElement(message, host.hostName);
|
| remoting.setMode(remoting.AppMode.CLIENT_PIN_PROMPT);
|
| };
|
| - remoting.connector.connectMe2Me(host, requestPin);
|
| + remoting.connector.connectMe2Me(host, requestPin, fetchThirdPartyToken);
|
| };
|
|
|
| /** @param {remoting.ClientSession} clientSession */
|
|
|