Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Unified Diff: remoting/webapp/client_plugin_async.js

Issue 10692179: Propagate connection state from networking layer to UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 () {};
/** @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']);
}
}

Powered by Google App Engine
This is Rietveld 408576698