| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/display/win/screen_win.h" | 5 #include "ui/display/win/screen_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <inttypes.h> | 8 #include <inttypes.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| 11 #include <cwchar> | 11 #include <cwchar> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <string> | 13 #include <string> |
| 14 #include <unordered_map> | 14 #include <unordered_map> |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
| 18 #include "base/macros.h" | 18 #include "base/macros.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 #include "ui/display/display.h" | 20 #include "ui/display/display.h" |
| 21 #include "ui/display/display_switches.h" |
| 21 #include "ui/display/screen.h" | 22 #include "ui/display/screen.h" |
| 23 #include "ui/display/test/display_test_util.h" |
| 22 #include "ui/display/win/display_info.h" | 24 #include "ui/display/win/display_info.h" |
| 23 #include "ui/display/win/dpi.h" | 25 #include "ui/display/win/dpi.h" |
| 24 #include "ui/display/win/screen_win_display.h" | 26 #include "ui/display/win/screen_win_display.h" |
| 25 #include "ui/gfx/geometry/rect.h" | 27 #include "ui/gfx/geometry/rect.h" |
| 26 #include "ui/gfx/switches.h" | |
| 27 #include "ui/gfx/test/display_util.h" | |
| 28 | 28 |
| 29 namespace display { | 29 namespace display { |
| 30 namespace win { | 30 namespace win { |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 MONITORINFOEX CreateMonitorInfo(gfx::Rect monitor, | 33 MONITORINFOEX CreateMonitorInfo(gfx::Rect monitor, |
| 34 gfx::Rect work, | 34 gfx::Rect work, |
| 35 std::wstring device_name) { | 35 std::wstring device_name) { |
| 36 MONITORINFOEX monitor_info; | 36 MONITORINFOEX monitor_info; |
| 37 ::ZeroMemory(&monitor_info, sizeof(monitor_info)); | 37 ::ZeroMemory(&monitor_info, sizeof(monitor_info)); |
| (...skipping 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1743 ScreenWin::ScreenToDIPSize(nullptr, gfx::Size(42, 131))); | 1743 ScreenWin::ScreenToDIPSize(nullptr, gfx::Size(42, 131))); |
| 1744 } | 1744 } |
| 1745 | 1745 |
| 1746 TEST_F(ScreenWinUninitializedForced2x, DIPToScreenSize) { | 1746 TEST_F(ScreenWinUninitializedForced2x, DIPToScreenSize) { |
| 1747 EXPECT_EQ(gfx::Size(42, 132), | 1747 EXPECT_EQ(gfx::Size(42, 132), |
| 1748 ScreenWin::DIPToScreenSize(nullptr, gfx::Size(21, 66))); | 1748 ScreenWin::DIPToScreenSize(nullptr, gfx::Size(21, 66))); |
| 1749 } | 1749 } |
| 1750 | 1750 |
| 1751 } // namespace win | 1751 } // namespace win |
| 1752 } // namespace display | 1752 } // namespace display |
| OLD | NEW |