OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_display.h" | 5 #include "ui/display/win/screen_win_display.h" |
6 | 6 |
7 #include "ui/display/win/display_info.h" | 7 #include "ui/display/win/display_info.h" |
8 #include "ui/display/win/screen_win.h" | 8 #include "ui/display/win/screen_win.h" |
9 #include "ui/gfx/win/dpi.h" | |
10 | 9 |
11 namespace display { | 10 namespace display { |
12 namespace win { | 11 namespace win { |
13 | 12 |
14 namespace { | 13 namespace { |
15 | 14 |
16 gfx::Display CreateDisplayFromDisplayInfo(const DisplayInfo& display_info) { | 15 gfx::Display CreateDisplayFromDisplayInfo(const DisplayInfo& display_info) { |
17 gfx::Display display(display_info.id()); | 16 gfx::Display display(display_info.id()); |
18 gfx::Rect dip_screen_bounds( | 17 gfx::Rect dip_screen_bounds( |
19 display::win::ScreenWin::ScreenToDIPRect(nullptr, | 18 display::win::ScreenWin::ScreenToDIPRect(nullptr, |
(...skipping 11 matching lines...) Expand all Loading... |
31 } // namespace | 30 } // namespace |
32 | 31 |
33 ScreenWinDisplay::ScreenWinDisplay() = default; | 32 ScreenWinDisplay::ScreenWinDisplay() = default; |
34 | 33 |
35 ScreenWinDisplay::ScreenWinDisplay(const DisplayInfo& display_info) | 34 ScreenWinDisplay::ScreenWinDisplay(const DisplayInfo& display_info) |
36 : display_(CreateDisplayFromDisplayInfo(display_info)), | 35 : display_(CreateDisplayFromDisplayInfo(display_info)), |
37 pixel_bounds_(display_info.screen_rect()) {} | 36 pixel_bounds_(display_info.screen_rect()) {} |
38 | 37 |
39 } // namespace win | 38 } // namespace win |
40 } // namespace display | 39 } // namespace display |
OLD | NEW |