Chromium Code Reviews| Index: remoting/webapp/client_plugin.js |
| diff --git a/remoting/webapp/client_plugin.js b/remoting/webapp/client_plugin.js |
| index 7b854a20698c7c7f01b840dfca33f21375e990fb..23896e0b8a5676e4186abde33f16a0589616959b 100644 |
| --- a/remoting/webapp/client_plugin.js |
| +++ b/remoting/webapp/client_plugin.js |
| @@ -64,6 +64,9 @@ remoting.ClientPlugin = function(plugin, onExtensionMessage) { |
| */ |
| this.updateMouseCursorImage = function(url, hotspotX, hotspotY) {}; |
| + /** @param {string} data Remote cast extension message. */ |
| + this.onCastExtensionHandler = function(data) {}; |
| + |
| /** @type {remoting.MediaSourceRenderer} */ |
| this.mediaSourceRenderer_ = null; |
| @@ -221,6 +224,13 @@ remoting.ClientPlugin.prototype.handleMessageMethod_ = function(message) { |
| // Let the host know that we can use the video framerecording extension. |
| this.capabilities_.push( |
| remoting.ClientSession.Capability.VIDEO_RECORDER); |
| + |
| + // Let the host know that we can support casting of the screen. |
| + // TODO(aiguha): Add this capability based on a gyp/command-line flag, |
| + // rather than by default. |
| + this.capabilities_.push( |
| + remoting.ClientSession.Capability.CAST); |
| + |
| } else if (this.pluginApiVersion_ >= 6) { |
| this.pluginApiFeatures_ = ['highQualityScaling', 'injectKeyEvent']; |
| } else { |
| @@ -315,6 +325,9 @@ remoting.ClientPlugin.prototype.handleMessageMethod_ = function(message) { |
| case 'test-echo-reply': |
| console.log('Got echo reply: ' + extMsgData); |
| break; |
| + case 'cast_message': |
|
aiguha
2014/08/13 01:29:33
Should we also check here if the capability is ena
|
| + this.onCastExtensionHandler(extMsgData); |
| + break; |
| default: |
| if (!this.onExtensionMessage_(extMsgType, extMsgData)) { |
| console.log('Unexpected message received: ' + |