Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1343)

Unified Diff: remoting/webapp/base/js/session_logger.js

Issue 2369013008: Log host and client screen sizes. (Closed)
Patch Set: Add DPI. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/base/js/chromoting_event.js ('k') | remoting/webapp/crd/js/desktop_connected_view.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..616b663c8526a29c00492e6c712048157c1e7406 100644
--- a/remoting/webapp/base/js/session_logger.js
+++ b/remoting/webapp/base/js/session_logger.js
@@ -263,6 +263,24 @@ 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, hostDpi, clientPluginSize, clientWindowSize, clientDpi,
+ clientFullscreen) {
+ this.maybeExpireSessionId_();
+ var entry = this.makeScreenResolutions_(hostSize, hostDpi, clientPluginSize,
+ clientWindowSize, clientDpi,
+ clientFullscreen);
+ this.log_(entry);
+};
+
+/**
* @param {remoting.ChromotingEvent.SessionState} state
* @param {remoting.Error=} opt_error
* @return {remoting.ChromotingEvent}
@@ -290,6 +308,30 @@ 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, hostDpi, clientPluginSize, clientWindowSize, clientDpi,
+ clientFullscreen) {
+ var entry = new remoting.ChromotingEvent(
+ remoting.ChromotingEvent.Type.SCREEN_RESOLUTIONS);
+ entry.client_video_size = new remoting.ChromotingEvent.ScreenResolution(
+ clientPluginSize.width, clientPluginSize.height, clientDpi);
+ entry.client_window_size = new remoting.ChromotingEvent.ScreenResolution(
+ clientWindowSize.width, clientWindowSize.height, clientDpi);
+ entry.host_all_screens_size = new remoting.ChromotingEvent.ScreenResolution(
+ hostSize.width, hostSize.height, hostDpi);
+ entry.client_fullscreen = clientFullscreen;
+ this.fillEvent_(entry);
+ return entry;
+};
+
+/**
* @return {remoting.ChromotingEvent}
* @private
*/
« no previous file with comments | « remoting/webapp/base/js/chromoting_event.js ('k') | remoting/webapp/crd/js/desktop_connected_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698