OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/client/plugin/chromoting_instance.h" | 5 #include "remoting/client/plugin/chromoting_instance.h" |
6 | 6 |
7 #include <nacl_io/nacl_io.h> | 7 #include <nacl_io/nacl_io.h> |
8 #include <sys/mount.h> | 8 #include <sys/mount.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
804 x_dpi <= 0 || y_dpi <= 0) { | 804 x_dpi <= 0 || y_dpi <= 0) { |
805 LOG(ERROR) << "Invalid notifyClientResolution."; | 805 LOG(ERROR) << "Invalid notifyClientResolution."; |
806 return; | 806 return; |
807 } | 807 } |
808 | 808 |
809 if (!IsConnected()) { | 809 if (!IsConnected()) { |
810 return; | 810 return; |
811 } | 811 } |
812 | 812 |
813 protocol::ClientResolution client_resolution; | 813 protocol::ClientResolution client_resolution; |
814 client_resolution.set_width(width); | |
815 client_resolution.set_height(height); | |
816 client_resolution.set_x_dpi(x_dpi); | 814 client_resolution.set_x_dpi(x_dpi); |
817 client_resolution.set_y_dpi(y_dpi); | 815 client_resolution.set_y_dpi(y_dpi); |
816 client_resolution.set_dips_width((width * kDefaultDPI) / x_dpi); | |
817 client_resolution.set_dips_height((height * kDefaultDPI) / y_dpi); | |
818 | 818 |
819 // Include the legacy width & height in DIPs for use by older hosts. | 819 // Include the legacy width & height in DIPs for use by older hosts. |
Jamie
2016/05/31 20:40:47
s/DIPs/device pixels/
Sergey Ulanov
2016/06/01 10:08:50
Done.
| |
820 client_resolution.set_dips_width((width * kDefaultDPI) / x_dpi); | 820 client_resolution.set_width_deprecated(width); |
821 client_resolution.set_dips_height((height * kDefaultDPI) / y_dpi); | 821 client_resolution.set_height_deprecated(height); |
822 | 822 |
823 client_->host_stub()->NotifyClientResolution(client_resolution); | 823 client_->host_stub()->NotifyClientResolution(client_resolution); |
824 } | 824 } |
825 | 825 |
826 void ChromotingInstance::HandleVideoControl(const base::DictionaryValue& data) { | 826 void ChromotingInstance::HandleVideoControl(const base::DictionaryValue& data) { |
827 protocol::VideoControl video_control; | 827 protocol::VideoControl video_control; |
828 bool pause_video = false; | 828 bool pause_video = false; |
829 if (data.GetBoolean("pause", &pause_video)) { | 829 if (data.GetBoolean("pause", &pause_video)) { |
830 video_control.set_enable(!pause_video); | 830 video_control.set_enable(!pause_video); |
831 perf_tracker_.OnPauseStateChanged(pause_video); | 831 perf_tracker_.OnPauseStateChanged(pause_video); |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1117 if (is_custom_counts_histogram) { | 1117 if (is_custom_counts_histogram) { |
1118 uma.HistogramCustomCounts(histogram_name, value, histogram_min, | 1118 uma.HistogramCustomCounts(histogram_name, value, histogram_min, |
1119 histogram_max, histogram_buckets); | 1119 histogram_max, histogram_buckets); |
1120 } else { | 1120 } else { |
1121 uma.HistogramCustomTimes(histogram_name, value, histogram_min, | 1121 uma.HistogramCustomTimes(histogram_name, value, histogram_min, |
1122 histogram_max, histogram_buckets); | 1122 histogram_max, histogram_buckets); |
1123 } | 1123 } |
1124 } | 1124 } |
1125 | 1125 |
1126 } // namespace remoting | 1126 } // namespace remoting |
OLD | NEW |