Chromium Code Reviews| Index: remoting/client/plugin/chromoting_instance.cc |
| diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc |
| index daf591f24713f7b062053c6db3ceb180153a2b33..62cc76af1284d2c748c3c65b76f68603d669ea6f 100644 |
| --- a/remoting/client/plugin/chromoting_instance.cc |
| +++ b/remoting/client/plugin/chromoting_instance.cc |
| @@ -54,6 +54,10 @@ namespace { |
| // 32-bit BGRA is 4 bytes per pixel. |
| const int kBytesPerPixel = 4; |
| +// Default DPI to assume for old clients that use notifyClientDimensions. |
| +const int kDefaultDPI = 96; |
| + |
| +// Interval at which to sample performance statistics. |
| const int kPerfStatsIntervalMs = 1000; |
| // URL scheme used by Chrome apps and extensions. |
| @@ -589,14 +593,22 @@ void ChromotingInstance::SendClipboardItem(const std::string& mime_type, |
| host_connection_->clipboard_stub()->InjectClipboardEvent(event); |
| } |
| -void ChromotingInstance::NotifyClientDimensions(int width, int height) { |
| +void ChromotingInstance::NotifyClientDimensions(int width, int height) |
|
Jamie
2013/02/11 20:35:37
This won't compile, surely? There's no opening bra
|
| if (!IsConnected()) { |
| return; |
| } |
| - protocol::ClientDimensions client_dimensions; |
| - client_dimensions.set_width(width); |
| - client_dimensions.set_height(height); |
| - host_connection_->host_stub()->NotifyClientDimensions(client_dimensions); |
| + |
| + protocol::ClientResolution client_resolution; |
| + client_resolution.set_width(width); |
| + client_resolution.set_height(height); |
| + client_resolution.set_x_dpi(kDefaultDPI); |
| + client_resolution.set_y_dpi(kDefaultDPI); |
| + |
| + // Include the legacy width & height for use by older hosts. |
| + client_resolution.set_dips_width(width); |
| + client_resolution.set_dips_height(height); |
| + |
| + host_connection_->host_stub()->NotifyClientResolution(client_resolution); |
| } |
| void ChromotingInstance::PauseVideo(bool pause) { |