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

Unified Diff: remoting/host/client_session.cc

Issue 12220092: Rename ClientDimensions to ClientResolution and add pixel-size and DPI fields. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typos in ChromotingInstance. Created 7 years, 10 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
Index: remoting/host/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index b62b2e4824adadbf98ab8e4c3b088ca177c6d5e2..51d3bd81829dcd6ecdbce612680c59427416b351 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -27,6 +27,11 @@
namespace remoting {
+namespace {
+// Default DPI to assume for old clients that use notifyClientDimensions.
+const int kDefaultDPI = 96;
+} // namespace
+
ClientSession::ClientSession(
EventHandler* event_handler,
scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
@@ -75,13 +80,16 @@ ClientSession::ClientSession(
auth_clipboard_filter_.set_enabled(false);
}
-void ClientSession::NotifyClientDimensions(
- const protocol::ClientDimensions& dimensions) {
- if (dimensions.has_width() && dimensions.has_height()) {
- VLOG(1) << "Received ClientDimensions (width="
- << dimensions.width() << ", height=" << dimensions.height() << ")";
- event_handler_->OnClientDimensionsChanged(
- this, SkISize::Make(dimensions.width(), dimensions.height()));
+void ClientSession::NotifyClientResolution(
+ const protocol::ClientResolution& resolution) {
+ if (resolution.has_dips_width() && resolution.has_dips_height()) {
+ VLOG(1) << "Received ClientResolution (dips_width="
+ << resolution.width() << ", dips_height="
+ << resolution.height() << ")";
+ event_handler_->OnClientResolutionChanged(
+ this,
+ SkISize::Make(resolution.dips_width(), resolution.dips_height()),
+ SkIPoint::Make(kDefaultDPI, kDefaultDPI));
Jamie 2013/02/11 23:25:58 Why not use the new fields, if present? Is that co
Wez 2013/02/12 01:55:28 Adding that separately, in crrev.com/12225113.
}
}

Powered by Google App Engine
This is Rietveld 408576698