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

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
« no previous file with comments | « remoting/webapp/client_plugin.js ('k') | remoting/webapp/client_session.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/client_plugin_async.js
diff --git a/remoting/webapp/client_plugin_async.js b/remoting/webapp/client_plugin_async.js
index dd1b5cd7d89b171f8b152eb22c331e58584f68f7..744d223cb3fce7e267c5f8fb3dd09aef535a34f3 100644
--- a/remoting/webapp/client_plugin_async.js
+++ b/remoting/webapp/client_plugin_async.js
@@ -38,6 +38,8 @@ remoting.ClientPluginAsync = function(plugin) {
* @param {number} error The error code, if any.
*/
this.onConnectionStatusUpdateHandler = function(state, error) {};
+ /** @param {boolean} ready Connection ready state. */
+ this.onConnectionReadyHandler = function(ready) {};
this.onDesktopSizeUpdateHandler = function () {};
/** @type {number} */
@@ -196,6 +198,12 @@ remoting.ClientPluginAsync.prototype.handleMessage_ = function(messageStr) {
if (remoting.clientSession) {
remoting.clientSession.onFirstFrameReceived();
}
+ } else if (message.method == 'onConnectionReady') {
+ if (typeof message.data['ready'] != 'boolean') {
+ console.error('Received incorrect onConnectionReady message.');
+ return;
+ }
+ this.onConnectionReadyHandler(message.data['ready']);
}
}
« no previous file with comments | « remoting/webapp/client_plugin.js ('k') | remoting/webapp/client_session.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698