| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * Interface abstracting the Application functionality. | 7 * Interface abstracting the Application functionality. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 * @param {remoting.ClientSession} clientSession | 99 * @param {remoting.ClientSession} clientSession |
| 100 * @return {void} Nothing. | 100 * @return {void} Nothing. |
| 101 */ | 101 */ |
| 102 remoting.Application.prototype.onConnected = function(clientSession) { | 102 remoting.Application.prototype.onConnected = function(clientSession) { |
| 103 // TODO(garykac): Make clientSession a member var of Application. | 103 // TODO(garykac): Make clientSession a member var of Application. |
| 104 remoting.clientSession = clientSession; | 104 remoting.clientSession = clientSession; |
| 105 remoting.clientSession.addEventListener('stateChanged', onClientStateChange_); | 105 remoting.clientSession.addEventListener('stateChanged', onClientStateChange_); |
| 106 | 106 |
| 107 remoting.clipboard.startSession(); | 107 remoting.clipboard.startSession(); |
| 108 updateStatistics_(); | 108 updateStatistics_(); |
| 109 remoting.hangoutSessionEvents.raiseEvent( | |
| 110 remoting.hangoutSessionEvents.sessionStateChanged, | |
| 111 remoting.ClientSession.State.CONNECTED | |
| 112 ); | |
| 113 | 109 |
| 114 this.delegate_.handleConnected(clientSession); | 110 this.delegate_.handleConnected(clientSession); |
| 115 }; | 111 }; |
| 116 | 112 |
| 117 /** | 113 /** |
| 118 * Called when the current session has been disconnected. | 114 * Called when the current session has been disconnected. |
| 119 * | 115 * |
| 120 * @return {void} Nothing. | 116 * @return {void} Nothing. |
| 121 */ | 117 */ |
| 122 remoting.Application.prototype.onDisconnected = function() { | 118 remoting.Application.prototype.onDisconnected = function() { |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 * Called when an error needs to be displayed to the user. | 266 * Called when an error needs to be displayed to the user. |
| 271 * | 267 * |
| 272 * @param {remoting.Error} errorTag The error to be localized and displayed. | 268 * @param {remoting.Error} errorTag The error to be localized and displayed. |
| 273 * @return {void} Nothing. | 269 * @return {void} Nothing. |
| 274 */ | 270 */ |
| 275 remoting.Application.Delegate.prototype.handleError = function(errorTag) {}; | 271 remoting.Application.Delegate.prototype.handleError = function(errorTag) {}; |
| 276 | 272 |
| 277 | 273 |
| 278 /** @type {remoting.Application} */ | 274 /** @type {remoting.Application} */ |
| 279 remoting.app = null; | 275 remoting.app = null; |
| OLD | NEW |