| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 * if necessary. | 173 * if necessary. |
| 174 */ | 174 */ |
| 175 remoting.Application.prototype.getSessionConnector = function() { | 175 remoting.Application.prototype.getSessionConnector = function() { |
| 176 // TODO(garykac): Check if this can be initialized in the ctor. | 176 // TODO(garykac): Check if this can be initialized in the ctor. |
| 177 if (!this.sessionConnector_) { | 177 if (!this.sessionConnector_) { |
| 178 this.sessionConnector_ = remoting.SessionConnector.factory.createConnector( | 178 this.sessionConnector_ = remoting.SessionConnector.factory.createConnector( |
| 179 document.getElementById('client-container'), | 179 document.getElementById('client-container'), |
| 180 this.onConnected.bind(this), | 180 this.onConnected.bind(this), |
| 181 this.onError.bind(this), | 181 this.onError.bind(this), |
| 182 this.onConnectionFailed.bind(this), | 182 this.onConnectionFailed.bind(this), |
| 183 this.appCapabilities_, | 183 this.appCapabilities_); |
| 184 this.delegate_.getDefaultRemapKeys()); | |
| 185 } | 184 } |
| 186 return this.sessionConnector_; | 185 return this.sessionConnector_; |
| 187 }; | 186 }; |
| 188 | 187 |
| 189 /** | 188 /** |
| 190 * Callback function called when the state of the client plugin changes. The | 189 * Callback function called when the state of the client plugin changes. The |
| 191 * current and previous states are available via the |state| member variable. | 190 * current and previous states are available via the |state| member variable. |
| 192 * | 191 * |
| 193 * @param {remoting.ClientSession.StateEvent=} state | 192 * @param {remoting.ClientSession.StateEvent=} state |
| 194 * @private | 193 * @private |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 * @param {!remoting.Error} error The failure reason. | 259 * @param {!remoting.Error} error The failure reason. |
| 261 */ | 260 */ |
| 262 remoting.Application.Delegate.prototype.signInFailed = function(error) {}; | 261 remoting.Application.Delegate.prototype.signInFailed = function(error) {}; |
| 263 | 262 |
| 264 /** | 263 /** |
| 265 * @return {string} Application product name to be used in UI. | 264 * @return {string} Application product name to be used in UI. |
| 266 */ | 265 */ |
| 267 remoting.Application.Delegate.prototype.getApplicationName = function() {}; | 266 remoting.Application.Delegate.prototype.getApplicationName = function() {}; |
| 268 | 267 |
| 269 /** | 268 /** |
| 270 * @return {string} The default remap keys for the current platform. | |
| 271 */ | |
| 272 remoting.Application.Delegate.prototype.getDefaultRemapKeys = function() {}; | |
| 273 | |
| 274 /** | |
| 275 * Called when a new session has been connected. | 269 * Called when a new session has been connected. |
| 276 * | 270 * |
| 277 * @param {remoting.ConnectionInfo} connectionInfo | 271 * @param {remoting.ConnectionInfo} connectionInfo |
| 278 * @return {void} Nothing. | 272 * @return {void} Nothing. |
| 279 */ | 273 */ |
| 280 remoting.Application.Delegate.prototype.handleConnected = function( | 274 remoting.Application.Delegate.prototype.handleConnected = function( |
| 281 connectionInfo) {}; | 275 connectionInfo) {}; |
| 282 | 276 |
| 283 /** | 277 /** |
| 284 * Called when the current session has been disconnected. | 278 * Called when the current session has been disconnected. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 * Perform any application-specific cleanup before exiting. This is called in | 312 * Perform any application-specific cleanup before exiting. This is called in |
| 319 * lieu of start() if the user declines the app permissions, and will usually | 313 * lieu of start() if the user declines the app permissions, and will usually |
| 320 * be called immediately prior to exiting, although delegates should not rely | 314 * be called immediately prior to exiting, although delegates should not rely |
| 321 * on this. | 315 * on this. |
| 322 */ | 316 */ |
| 323 remoting.Application.Delegate.prototype.handleExit = function() {}; | 317 remoting.Application.Delegate.prototype.handleExit = function() {}; |
| 324 | 318 |
| 325 | 319 |
| 326 /** @type {remoting.Application} */ | 320 /** @type {remoting.Application} */ |
| 327 remoting.app = null; | 321 remoting.app = null; |
| OLD | NEW |