Index: ui/gfx/screen_win.cc |
diff --git a/ui/gfx/screen_win.cc b/ui/gfx/screen_win.cc |
index 3199f7acaacdd2b15c3dca37d09014dc418c2d00..578a7420239ec52f7cb64d025fe220d91aa7d74b 100644 |
--- a/ui/gfx/screen_win.cc |
+++ b/ui/gfx/screen_win.cc |
@@ -15,6 +15,7 @@ |
#include "base/win/win_util.h" |
#include "ui/gfx/display.h" |
#include "ui/gfx/win/dpi.h" |
+#include "ui/gfx/win/physical_size.h" |
namespace { |
@@ -26,9 +27,12 @@ MONITORINFOEX GetMonitorInfoForMonitor(HMONITOR monitor) { |
return monitor_info; |
} |
+int64_t GenerateDisplayId(const std::string& str) { |
sky
2016/01/14 15:36:58
Is this change still needed?
Bret
2016/01/14 21:46:45
I missed that. Reverted.
|
+ return static_cast<int64_t>(base::Hash(str)); |
+} |
+ |
gfx::Display GetDisplay(const MONITORINFOEX& monitor_info) { |
- int64_t id = |
- static_cast<int64_t>(base::Hash(base::WideToUTF8(monitor_info.szDevice))); |
+ int64_t id = GenerateDisplayId(base::WideToUTF8(monitor_info.szDevice)); |
gfx::Rect bounds = gfx::Rect(monitor_info.rcMonitor); |
gfx::Display display(id); |
display.set_bounds(gfx::win::ScreenToDIPRect(bounds)); |