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

Unified Diff: services/ui/display/viewport_metrics.cc

Issue 2476663003: PlatformScreenOzone using DisplayManager (Closed)
Patch Set: Add missing data_dep. Created 4 years 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 | « services/ui/display/viewport_metrics.h ('k') | ui/display/manager/display_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/display/viewport_metrics.cc
diff --git a/services/ui/display/viewport_metrics.cc b/services/ui/display/viewport_metrics.cc
index 7ad2bec74ad066c03b4c81821ea9532843bd8434..0cbacae06bb9bf991788f11a3f3a06319d44c888 100644
--- a/services/ui/display/viewport_metrics.cc
+++ b/services/ui/display/viewport_metrics.cc
@@ -10,6 +10,19 @@ namespace display {
namespace {
+std::string TouchSupportString(Display::TouchSupport touch_support) {
+ switch (touch_support) {
+ case Display::TOUCH_SUPPORT_UNKNOWN:
+ return "unknown";
+ case Display::TOUCH_SUPPORT_AVAILABLE:
+ return "available";
+ case Display::TOUCH_SUPPORT_UNAVAILABLE:
+ return "unavailable";
+ }
+ NOTREACHED();
+ return "Invalid TouchSupport";
+}
+
std::string RotationString(Display::Rotation rotation) {
switch (rotation) {
case Display::ROTATE_0:
@@ -30,10 +43,12 @@ std::string RotationString(Display::Rotation rotation) {
std::string ViewportMetrics::ToString() const {
return base::StringPrintf(
"ViewportMetrics(bounds=%s, work_area=%s, pixel_size=%s, "
- "rotation=%s, device_scale_factor=%g)",
+ "rotation=%s, touch_support=%s, "
+ "device_scale_factor=%g, ui_scale_factor=%g)",
bounds.ToString().c_str(), work_area.ToString().c_str(),
pixel_size.ToString().c_str(), RotationString(rotation).c_str(),
- device_scale_factor);
+ TouchSupportString(touch_support).c_str(), device_scale_factor,
+ ui_scale_factor);
}
} // namespace display
« no previous file with comments | « services/ui/display/viewport_metrics.h ('k') | ui/display/manager/display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698