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

Unified Diff: ui/gfx/display.h

Issue 1563183008: Added capability on Windows to get the physical dimensions of your attached monitors. Also added th… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 2 Created 4 years, 11 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
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/display.cc » ('j') | ui/gfx/screen_win.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/display.h
diff --git a/ui/gfx/display.h b/ui/gfx/display.h
index c6df7e703ad54dba04977ee2ce6ed1a6d9df791a..536b9eddcd9e72ffd6cb440a424d9c9d58d666f2 100644
--- a/ui/gfx/display.h
+++ b/ui/gfx/display.h
@@ -135,6 +135,13 @@ class GFX_EXPORT Display {
// True if the display corresponds to internal panel.
bool IsInternal() const;
+ // True if the physical size information is available.
+ bool IsPhysicalSizeAvailable() const;
+
+ // Gets/Sets the physical dimensions of the display in millimeters.
+ gfx::Size GetPhysicalSizeMm() const;
+ void SetPhysicalSize(int width_mm, int height_mm);
robliao 2016/01/13 00:22:10 SetPhysicalSizeMm(gfx::Size size_mm) for symmetry
Bret 2016/01/13 18:02:48 Done.
robliao 2016/01/13 18:18:22 This should still accept gfx::Size as an input.
+
// Gets/Sets an id of display corresponding to internal panel.
static int64_t InternalDisplayId();
static void SetInternalDisplayId(int64_t internal_display_id);
@@ -152,6 +159,8 @@ class GFX_EXPORT Display {
float device_scale_factor_;
Rotation rotation_;
TouchSupport touch_support_;
+ int physical_width_mm_;
robliao 2016/01/13 00:22:10 gfx::Size physical_size_mm;
Bret 2016/01/13 18:02:48 Done.
+ int physical_height_mm_;
};
} // namespace gfx
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/display.cc » ('j') | ui/gfx/screen_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698