Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 * Functions related to the 'client screen' for Chromoting. | 7 * Functions related to the 'client screen' for Chromoting. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 353 }; | 353 }; |
| 354 | 354 |
| 355 /** | 355 /** |
| 356 * Extension message handler. | 356 * Extension message handler. |
| 357 * | 357 * |
| 358 * @param {string} type The type of the extension message. | 358 * @param {string} type The type of the extension message. |
| 359 * @param {string} data The payload of the extension message. | 359 * @param {string} data The payload of the extension message. |
| 360 * @return {boolean} Return true if the extension message was recognized. | 360 * @return {boolean} Return true if the extension message was recognized. |
| 361 */ | 361 */ |
| 362 remoting.onExtensionMessage = function(type, data) { | 362 remoting.onExtensionMessage = function(type, data) { |
| 363 if (remoting.clientSession && | |
| 364 remoting.clientSession.handleVideoRecorderMessage(type, data)) { | |
|
Jamie
2014/08/01 01:28:36
Since handleVideoRecorderMessage has side-effects,
Wez
2014/08/19 00:15:52
Done.
| |
| 365 return true; | |
| 366 } | |
| 363 return false; | 367 return false; |
| 364 }; | 368 }; |
| 365 | 369 |
| 366 /** | 370 /** |
| 367 * Create a session connector if one doesn't already exist. | 371 * Create a session connector if one doesn't already exist. |
| 368 */ | 372 */ |
| 369 remoting.ensureSessionConnector_ = function() { | 373 remoting.ensureSessionConnector_ = function() { |
| 370 if (!remoting.connector) { | 374 if (!remoting.connector) { |
| 371 remoting.connector = new remoting.SessionConnector( | 375 remoting.connector = new remoting.SessionConnector( |
| 372 document.getElementById('video-container'), | 376 document.getElementById('video-container'), |
| 373 remoting.onConnected, | 377 remoting.onConnected, |
| 374 showConnectError_, remoting.onExtensionMessage); | 378 showConnectError_, remoting.onExtensionMessage); |
| 375 } | 379 } |
| 376 }; | 380 }; |
| OLD | NEW |