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

Unified Diff: ui/gfx/android/device_display_info.cc

Issue 93933016: Android: Add support for returning real screen resolution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return supported boolean. Created 7 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
Index: ui/gfx/android/device_display_info.cc
diff --git a/ui/gfx/android/device_display_info.cc b/ui/gfx/android/device_display_info.cc
index 2de8440e1d3e2b41e9b7b0bc5384188d7fd8b929..90d060cd7595be726e52b741dabb05473e9f1152 100644
--- a/ui/gfx/android/device_display_info.cc
+++ b/ui/gfx/android/device_display_info.cc
@@ -23,6 +23,20 @@ int DeviceDisplayInfo::GetDisplayWidth() {
return SharedDeviceDisplayInfo::GetInstance()->GetDisplayWidth();
}
+int DeviceDisplayInfo::GetRealDisplayHeight(bool& supported) {
+ int height = SharedDeviceDisplayInfo::GetInstance()->GetRealDisplayHeight();
+ if (!(supported = height > 0))
no sievers 2013/12/20 19:51:19 And could we just return 0 here and below if not s
+ height = GetDisplayHeight();
+ return height;
+}
+
+int DeviceDisplayInfo::GetRealDisplayWidth(bool& supported) {
+ int width = SharedDeviceDisplayInfo::GetInstance()->GetRealDisplayWidth();
+ if (!(supported = width > 0))
+ width = GetDisplayWidth();
+ return width;
+}
+
int DeviceDisplayInfo::GetBitsPerPixel() {
return SharedDeviceDisplayInfo::GetInstance()->GetBitsPerPixel();
}

Powered by Google App Engine
This is Rietveld 408576698