Chromium Code Reviews| Index: remoting/webapp/client_session.js |
| diff --git a/remoting/webapp/client_session.js b/remoting/webapp/client_session.js |
| index fbd38d30fe7914454e9b8eb1ad926f558a789771..f9bd25333fd2034eef0ad0e3a71ed0f04fef9dbe 100644 |
| --- a/remoting/webapp/client_session.js |
| +++ b/remoting/webapp/client_session.js |
| @@ -303,7 +303,9 @@ remoting.ClientSession.prototype.onPluginInitialized_ = |
| }; |
| this.plugin.onConnectionStatusUpdateHandler = |
| - this.connectionStatusUpdateCallback.bind(this); |
| + this.onConnectionStatusUpdate_.bind(this); |
| + this.plugin.onConnectionInactiveHandler = |
| + this.onConnectionInactive_.bind(this); |
| this.plugin.onDesktopSizeUpdateHandler = |
| this.onDesktopSizeChanged_.bind(this); |
| @@ -482,7 +484,7 @@ remoting.ClientSession.prototype.connectPluginToWcs_ = |
| * @param {number} status The plugin's status. |
| * @param {number} error The plugin's error state, if any. |
|
Jamie
2012/07/12 01:46:42
Add @private if this is a private method, or remov
Sergey Ulanov
2012/07/13 20:42:50
Done.
|
| */ |
| -remoting.ClientSession.prototype.connectionStatusUpdateCallback = |
| +remoting.ClientSession.prototype.onConnectionStatusUpdate_ = |
| function(status, error) { |
| if (status == remoting.ClientSession.State.CONNECTED) { |
| this.onDesktopSizeChanged_(); |
| @@ -493,6 +495,21 @@ remoting.ClientSession.prototype.connectionStatusUpdateCallback = |
| }; |
| /** |
| + * Callback that the plugin invokes to indicate when the connection is |
| + * inactive. |
| + * |
| + * @param {boolean} inactive True if the connection is inactive. |
|
Jamie
2012/07/12 01:46:42
Add @private or remove the underscore.
Sergey Ulanov
2012/07/13 20:42:50
Done.
|
| + */ |
| +remoting.ClientSession.prototype.onConnectionInactive_ = |
| + function(inactive) { |
| + if (inactive) { |
| + this.plugin.element().classList.add("session-client-inactive"); |
| + } else { |
| + this.plugin.element().classList.remove("session-client-inactive"); |
| + } |
| +} |
| + |
| +/** |
| * @private |
| * @param {remoting.ClientSession.State} newState The new state for the session. |
| * @return {void} Nothing. |