Chromium Code Reviews| Index: remoting/webapp/client_session.js |
| diff --git a/remoting/webapp/client_session.js b/remoting/webapp/client_session.js |
| index 3579b0d55327a22961752911e0d5bd42deeaa83d..ce09b2a628223c6b11a99995d88e71d732a7dd38 100644 |
| --- a/remoting/webapp/client_session.js |
| +++ b/remoting/webapp/client_session.js |
| @@ -162,10 +162,15 @@ remoting.ClientSession = function(container, hostDisplayName, accessCode, |
| this.shrinkToFitButton_ = document.getElementById('screen-shrink-to-fit'); |
| /** @type {HTMLElement} @private */ |
| this.fullScreenButton_ = document.getElementById('toggle-full-screen'); |
| + /** @type {HTMLElement} @private */ |
| + this.recordingButton_ = document.getElementById('start-stop-recording'); |
| /** @type {remoting.GnubbyAuthHandler} @private */ |
| this.gnubbyAuthHandler_ = null; |
| + /** @type {remoting.VideoFrameRecorder} @private */ |
| + this.videoFrameRecorder_ = null; |
| + |
| if (this.mode_ == remoting.ClientSession.Mode.IT2ME) { |
| // Resize-to-client is not supported for IT2Me hosts. |
| this.resizeToClientButton_.hidden = true; |
| @@ -175,6 +180,7 @@ remoting.ClientSession = function(container, hostDisplayName, accessCode, |
| this.fullScreenButton_.addEventListener( |
| 'click', this.callToggleFullScreen_, false); |
| + |
| this.defineEvents(Object.keys(remoting.ClientSession.Events)); |
| }; |
| @@ -1080,6 +1086,13 @@ remoting.ClientSession.prototype.onSetCapabilities_ = function(capabilities) { |
| clientArea.height, |
| window.devicePixelRatio); |
| } |
| + if (this.hasCapability_( |
| + remoting.ClientSession.Capability.VIDEO_RECORDER)) { |
| + this.videoFrameRecorder_ = new remoting.VideoFrameRecorder(); |
|
kelvinp
2014/08/15 23:37:31
This change looks pretty cool. Are we shipping thi
Sergey Ulanov
2014/08/16 00:16:58
This feature is disabled in the host by default an
|
| + this.recordingButton_.hidden = false; |
| + this.recordingButton_.addEventListener( |
| + 'click', this.videoFrameRecorder_.startStopRecording.bind(this), false); |
| + } |
| }; |
| /** |
| @@ -1578,3 +1591,14 @@ remoting.ClientSession.prototype.getPluginPositionForTesting = function() { |
| left: parseFloat(style.marginLeft) |
| }; |
| }; |
| + |
| +/** |
| + * |
| + */ |
| +remoting.ClientSession.prototype.handleExtensionMessage = |
| + function(type, data) { |
| + if (this.videoFrameRecorder_) { |
| + return this.videoFrameRecorder_.handleMessage(type, data); |
| + } |
| + return false; |
| +} |