Chromium Code Reviews| Index: remoting/webapp/client_screen.js |
| diff --git a/remoting/webapp/client_screen.js b/remoting/webapp/client_screen.js |
| index cb54aa358610d94f66dc65ff869488d962ad183a..2f90f91e8e830c42f1de4b760de7783565c2c22d 100644 |
| --- a/remoting/webapp/client_screen.js |
| +++ b/remoting/webapp/client_screen.js |
| @@ -55,7 +55,7 @@ remoting.onVisibilityChanged = function() { |
| remoting.clientSession.pauseVideo( |
| ('hidden' in document) ? document.hidden : document.webkitHidden); |
| } |
| -} |
| +}; |
| /** |
| * Disconnect the remoting client. |
| @@ -89,6 +89,9 @@ function onClientStateChange_(state) { |
| if (remoting.clientSession.getMode() == |
| remoting.ClientSession.Mode.IT2ME) { |
| remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_IT2ME); |
| + remoting.hrdSessionEvents.raiseEvent( |
| + 'sessionStateChanged', |
|
Jamie
2014/08/05 21:15:13
Can you declare the available session events as an
kelvinp
2014/08/07 18:03:24
I can make the event name into a constant.
We can'
|
| + remoting.hrdSessionEvents.SessionStates.CLOSED); |
| } else { |
| remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_ME2ME); |
| } |
| @@ -133,6 +136,10 @@ function showConnectError_(errorTag) { |
| : remoting.connector.getConnectionMode(); |
| if (mode == remoting.ClientSession.Mode.IT2ME) { |
| remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME); |
| + remoting.hrdSessionEvents.raiseEvent( |
| + 'sessionStateChanged', |
| + remoting.hrdSessionEvents.SessionStates.ERROR |
| + ); |
| } else { |
| remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME); |
| } |
| @@ -317,6 +324,10 @@ remoting.onConnected = function(clientSession) { |
| remoting.toolbar.preview(); |
| remoting.clipboard.startSession(); |
| updateStatistics_(); |
| + remoting.hrdSessionEvents.raiseEvent( |
| + 'sessionStateChanged', |
| + remoting.hrdSessionEvents.SessionStates.CONNECTED |
| + ); |
| if (remoting.connector.pairingRequested) { |
| /** |
| * @param {string} clientId |