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 | 5 |
6 /** | 6 /** |
7 * @fileoverview | 7 * @fileoverview |
8 * A class that loads a WCS IQ client and constructs remoting.wcs as a | 8 * A class that loads a WCS IQ client and constructs remoting.wcs as a |
9 * wrapper for it. | 9 * wrapper for it. |
10 */ | 10 */ |
(...skipping 28 matching lines...) Expand all Loading... |
39 * @return {void} Nothing. | 39 * @return {void} Nothing. |
40 */ | 40 */ |
41 remoting.WcsLoader.load = function(onReady, onError) { | 41 remoting.WcsLoader.load = function(onReady, onError) { |
42 if (!remoting.wcsLoader) { | 42 if (!remoting.wcsLoader) { |
43 remoting.wcsLoader = new remoting.WcsLoader(); | 43 remoting.wcsLoader = new remoting.WcsLoader(); |
44 } | 44 } |
45 /** @param {string} token The OAuth2 access token. */ | 45 /** @param {string} token The OAuth2 access token. */ |
46 var start = function(token) { | 46 var start = function(token) { |
47 remoting.wcsLoader.start_(token, onReady, onError); | 47 remoting.wcsLoader.start_(token, onReady, onError); |
48 }; | 48 }; |
49 remoting.oauth2.callWithToken(start, onError); | 49 remoting.identity.callWithToken(start, onError); |
50 }; | 50 }; |
51 | 51 |
52 /** | 52 /** |
53 * The URL of the GTalk gadget. | 53 * The URL of the GTalk gadget. |
54 * @type {string} | 54 * @type {string} |
55 * @private | 55 * @private |
56 */ | 56 */ |
57 remoting.WcsLoader.prototype.TALK_GADGET_URL_ = | 57 remoting.WcsLoader.prototype.TALK_GADGET_URL_ = |
58 'https://chromoting-client.talkgadget.google.com/talkgadget/'; | 58 'https://chromoting-client.talkgadget.google.com/talkgadget/'; |
59 | 59 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 * an OAuth2 access token when WCS has been loaded. | 140 * an OAuth2 access token when WCS has been loaded. |
141 * @return {void} Nothing. | 141 * @return {void} Nothing. |
142 * @private | 142 * @private |
143 */ | 143 */ |
144 remoting.WcsLoader.prototype.constructWcs_ = function(token, onReady) { | 144 remoting.WcsLoader.prototype.constructWcs_ = function(token, onReady) { |
145 remoting.wcs = new remoting.Wcs( | 145 remoting.wcs = new remoting.Wcs( |
146 remoting.wcsLoader.wcsIqClient, | 146 remoting.wcsLoader.wcsIqClient, |
147 token, | 147 token, |
148 function() { onReady(token); }); | 148 function() { onReady(token); }); |
149 }; | 149 }; |
OLD | NEW |