Chromium Code Reviews| Index: remoting/webapp/app_remoting/js/app_remoting.js |
| diff --git a/remoting/webapp/app_remoting/js/app_remoting.js b/remoting/webapp/app_remoting/js/app_remoting.js |
| index 25a1f8d11ebae5245d068f2fb3e5bffdc5b3be32..a2040a60e342e227bc38eb20263b0007248a4dd7 100644 |
| --- a/remoting/webapp/app_remoting/js/app_remoting.js |
| +++ b/remoting/webapp/app_remoting/js/app_remoting.js |
| @@ -15,17 +15,21 @@ var remoting = remoting || {}; |
| /** |
| * @param {Array<string>} appCapabilities Array of application capabilities. |
| + * @param {!remoting.LicenseManager} licenseManager |
| * @constructor |
| * @implements {remoting.ApplicationInterface} |
| * @extends {remoting.Application} |
| */ |
| -remoting.AppRemoting = function(appCapabilities) { |
| +remoting.AppRemoting = function(appCapabilities, licenseManager) { |
| base.inherits(this, remoting.Application); |
| /** @private {remoting.Activity} */ |
| this.activity_ = null; |
| /** @private */ |
| + this.licenseManager_ = licenseManager; |
| + |
| + /** @private */ |
| this.appCapabilities_ = appCapabilities; |
| }; |
| @@ -55,20 +59,23 @@ remoting.AppRemoting.prototype.signInFailed_ = function(error) { |
| /** |
| * @override {remoting.ApplicationInterface} |
| */ |
| -remoting.AppRemoting.prototype.initApplication_ = function() { |
| - var windowShape = new remoting.WindowShape(); |
| - windowShape.updateClientWindowShape(); |
| - |
| - this.activity_ = new remoting.AppRemotingActivity(this.appCapabilities_, this, |
| - windowShape); |
| -}; |
| +remoting.AppRemoting.prototype.initApplication_ = function() {}; |
| /** |
| * @param {string} token An OAuth access token. |
| * @override {remoting.ApplicationInterface} |
| */ |
| remoting.AppRemoting.prototype.startApplication_ = function(token) { |
| - this.activity_.start(); |
| + var windowShape = new remoting.WindowShape(); |
| + windowShape.updateClientWindowShape(); |
| + var that = this; |
| + |
| + this.licenseManager_.getSubscriptionToken(token).then( |
|
garykac
2015/06/04 22:13:43
We should allow licenseManager go be null and simp
kelvinp
2015/06/05 20:45:20
Good idea. Done
|
| + function(/** string*/ subscriptionToken) { |
| + that.activity_ = new remoting.AppRemotingActivity( |
| + that.appCapabilities_, that, windowShape, subscriptionToken); |
| + that.activity_.start(); |
| + }); |
| }; |
| /** |