Chromium Code Reviews| Index: remoting/webapp/client_plugin_async.js |
| diff --git a/remoting/webapp/client_plugin_async.js b/remoting/webapp/client_plugin_async.js |
| index e57902eb7a933e63d9ad831921151b9d8e6737c5..2996a7e0d069f03500dc608fe543ebf50c412db8 100644 |
| --- a/remoting/webapp/client_plugin_async.js |
| +++ b/remoting/webapp/client_plugin_async.js |
| @@ -36,6 +36,8 @@ remoting.ClientPluginAsync = function(plugin) { |
| * @param {number} error The error code, if any. |
| */ |
| this.onConnectionStatusUpdateHandler = function(state, error) {}; |
| + /** @param {boolean} inactive Connection inactivity state. */ |
| + this.onConnectionInactiveHandler = function(inactive) {}; |
| this.onDesktopSizeUpdateHandler = function () {}; |
|
Wez
2012/07/16 18:51:23
nit: Add a comment for the desktop size update han
Sergey Ulanov
2012/07/17 01:17:18
onDesktopSizeUpdateHandler() doesn't have any para
|
| /** @type {number} */ |
| @@ -190,6 +192,12 @@ remoting.ClientPluginAsync.prototype.handleMessage_ = function(messageStr) { |
| if (remoting.clientSession) { |
| remoting.clientSession.onFirstFrameReceived(); |
| } |
| + } else if (message.method == 'onConnectionInactive') { |
| + if (typeof message.data['inactive'] != 'boolean') { |
| + console.error('Received incorrect onConnectionInactive message.'); |
| + return; |
| + } |
| + this.onConnectionInactiveHandler(message.data['inactive']); |
| } |
| } |