Index: remoting/webapp/base/js/session_logger.js |
diff --git a/remoting/webapp/base/js/session_logger.js b/remoting/webapp/base/js/session_logger.js |
index 7e0341312611873fea054e4d4aa8a02857f95c5a..78eac1af9a8daae2c8b160d5eb9ca4fcc785fd1f 100644 |
--- a/remoting/webapp/base/js/session_logger.js |
+++ b/remoting/webapp/base/js/session_logger.js |
@@ -263,6 +263,22 @@ remoting.SessionLogger.prototype.logStatistics = function(stats) { |
}; |
/** |
+ * Logs host and client dimensions. |
+ * |
+ * @param {{width: number, height: number}} hostSize |
+ * @param {{width: number, height: number}} clientPluginSize |
+ * @param {{width: number, height: number}} clientWindowSize |
+ * @param {boolean} clientFullscreen |
+ */ |
+remoting.SessionLogger.prototype.logScreenResolutions = |
+ function(hostSize, clientPluginSize, clientWindowSize, clientFullscreen) { |
Lambros
2016/09/28 21:47:57
clientVideoSize instead of clientPluginSize ?
(her
Jamie
2016/09/28 22:09:29
I went with plugin instead of video here because i
|
+ this.maybeExpireSessionId_(); |
+ var entry = this.makeScreenResolutions_(hostSize, clientPluginSize, |
+ clientWindowSize, clientFullscreen); |
+ this.log_(entry); |
+}; |
+ |
+/** |
* @param {remoting.ChromotingEvent.SessionState} state |
* @param {remoting.Error=} opt_error |
* @return {remoting.ChromotingEvent} |
@@ -290,6 +306,29 @@ remoting.SessionLogger.prototype.makeSessionStateChange_ = |
}; |
/** |
+ * @param {{width: number, height: number}} hostSize |
+ * @param {{width: number, height: number}} clientPluginSize |
+ * @param {{width: number, height: number}} clientWindowSize |
+ * @param {boolean} clientFullscreen |
+ * @return {remoting.ChromotingEvent} |
+ * @private |
+ */ |
+remoting.SessionLogger.prototype.makeScreenResolutions_ = |
+ function(hostSize, clientPluginSize, clientWindowSize, clientFullscreen) { |
+ var entry = new remoting.ChromotingEvent( |
+ remoting.ChromotingEvent.Type.SCREEN_RESOLUTIONS); |
+ entry.client_video_size = new remoting.ChromotingEvent.ScreenResolution( |
+ clientPluginSize.width, clientPluginSize.height); |
+ entry.client_window_size = new remoting.ChromotingEvent.ScreenResolution( |
+ clientWindowSize.width, clientWindowSize.height); |
+ entry.host_all_screens_size = new remoting.ChromotingEvent.ScreenResolution( |
+ hostSize.width, hostSize.height); |
+ entry.client_fullscreen = clientFullscreen; |
+ this.fillEvent_(entry); |
+ return entry; |
+}; |
+ |
+/** |
* @return {remoting.ChromotingEvent} |
* @private |
*/ |