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 * Class that wraps low-level details of interacting with the client plugin. | 7 * Class that wraps low-level details of interacting with the client plugin. |
8 * | 8 * |
9 * This abstracts a <embed> element and controls the plugin which does | 9 * This abstracts a <embed> element and controls the plugin which does |
10 * the actual remoting work. It also handles differences between | 10 * the actual remoting work. It also handles differences between |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 case 'gnubby-auth': | 364 case 'gnubby-auth': |
365 this.onGnubbyAuthHandler(extMsgData); | 365 this.onGnubbyAuthHandler(extMsgData); |
366 break; | 366 break; |
367 case 'test-echo-reply': | 367 case 'test-echo-reply': |
368 console.log('Got echo reply: ' + extMsgData); | 368 console.log('Got echo reply: ' + extMsgData); |
369 break; | 369 break; |
370 case 'cast_message': | 370 case 'cast_message': |
371 this.onCastExtensionHandler(extMsgData); | 371 this.onCastExtensionHandler(extMsgData); |
372 break; | 372 break; |
373 default: | 373 default: |
374 if (!this.onExtensionMessage_(extMsgType, extMsgData)) { | 374 this.onExtensionMessage_(extMsgType, extMsgData); |
375 console.log('Unexpected message received: ' + | 375 break; |
376 extMsgType + ': ' + extMsgData); | |
377 } | |
378 } | 376 } |
379 | 377 |
380 } else if (message.method == 'mediaSourceReset') { | 378 } else if (message.method == 'mediaSourceReset') { |
381 if (!this.mediaSourceRenderer_) { | 379 if (!this.mediaSourceRenderer_) { |
382 console.error('Unexpected mediaSourceReset.'); | 380 console.error('Unexpected mediaSourceReset.'); |
383 return; | 381 return; |
384 } | 382 } |
385 this.mediaSourceRenderer_.reset(getStringAttr(message.data, 'format')) | 383 this.mediaSourceRenderer_.reset(getStringAttr(message.data, 'format')) |
386 | 384 |
387 } else if (message.method == 'mediaSourceData') { | 385 } else if (message.method == 'mediaSourceData') { |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 * Undo the CSS rules needed to make the plugin clickable for click-to-play. | 815 * Undo the CSS rules needed to make the plugin clickable for click-to-play. |
818 * @private | 816 * @private |
819 */ | 817 */ |
820 remoting.ClientPlugin.prototype.hidePluginForClickToPlay_ = function() { | 818 remoting.ClientPlugin.prototype.hidePluginForClickToPlay_ = function() { |
821 this.plugin_.style.width = ''; | 819 this.plugin_.style.width = ''; |
822 this.plugin_.style.height = ''; | 820 this.plugin_.style.height = ''; |
823 this.plugin_.style.top = ''; | 821 this.plugin_.style.top = ''; |
824 this.plugin_.style.left = ''; | 822 this.plugin_.style.left = ''; |
825 this.plugin_.style.position = ''; | 823 this.plugin_.style.position = ''; |
826 }; | 824 }; |
OLD | NEW |