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

Unified Diff: ui/gfx/win/physical_size.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: . 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
Index: ui/gfx/win/physical_size.h
diff --git a/ui/gfx/win/physical_size.h b/ui/gfx/win/physical_size.h
new file mode 100644
index 0000000000000000000000000000000000000000..7c90b8524fa7dbfc0fdd9ed76603c1f755df272e
--- /dev/null
+++ b/ui/gfx/win/physical_size.h
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_WIN_PHYSICAL_SIZE_H_
+#define UI_GFX_WIN_PHYSICAL_SIZE_H_
+
+#include <string>
+#include <vector>
+
+#include "ui/gfx/gfx_export.h"
+
+namespace gfx {
+
+struct PhysicalDisplaySize {
+ std::string display_name;
+ int width_mm;
+ int height_mm;
+
+ PhysicalDisplaySize(std::string display_name, int width_mm, int height_mm)
scottmg 2016/01/12 01:03:13 Always pass std::string as "const std::string&".
Bret 2016/01/12 22:55:17 Done.
+ : display_name(display_name), width_mm(width_mm), height_mm(height_mm) {}
+};
+
+// Gets the physical size for all displays.
+void GFX_EXPORT
scottmg 2016/01/12 01:03:13 GFX_EXPORT before void, not after.
Bret 2016/01/12 22:55:17 Done.
+GetPhysicalSizeForDisplays(std::vector<PhysicalDisplaySize>* out);
scottmg 2016/01/12 01:03:13 Consider having this return std::vector<PhysicalDi
Bret 2016/01/12 22:55:17 Done.
+
+} // namespace gfx
+
+#endif // UI_GFX_DPI_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698