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 #ifndef UI_GFX_WIN_DISPLAY_INFO_H_ | 5 #ifndef UI_DISPLAY_WIN_DISPLAY_INFO_H_ |
6 #define UI_GFX_WIN_DISPLAY_INFO_H_ | 6 #define UI_DISPLAY_WIN_DISPLAY_INFO_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
| 11 #include "ui/display/display_export.h" |
11 #include "ui/gfx/display.h" | 12 #include "ui/gfx/display.h" |
12 #include "ui/gfx/gfx_export.h" | |
13 | 13 |
14 namespace gfx { | 14 namespace display { |
15 namespace win { | 15 namespace win { |
16 | 16 |
17 // Gathers the parameters necessary to create a gfx::win::ScreenWinDisplay. | 17 // Gathers the parameters necessary to create a display::win::ScreenWinDisplay. |
18 class GFX_EXPORT DisplayInfo final { | 18 class DISPLAY_EXPORT DisplayInfo final { |
19 public: | 19 public: |
20 DisplayInfo(const MONITORINFOEX& monitor_info, float device_scale_factor); | 20 DisplayInfo(const MONITORINFOEX& monitor_info, float device_scale_factor); |
21 DisplayInfo(const MONITORINFOEX& monitor_info, | 21 DisplayInfo(const MONITORINFOEX& monitor_info, |
22 float device_scale_factor, | 22 float device_scale_factor, |
23 gfx::Display::Rotation rotation); | 23 gfx::Display::Rotation rotation); |
24 | 24 |
25 static int64_t DeviceIdFromDeviceName(const wchar_t* device_name); | 25 static int64_t DeviceIdFromDeviceName(const wchar_t* device_name); |
26 | 26 |
27 int64_t id() const { return id_; } | 27 int64_t id() const { return id_; } |
28 gfx::Display::Rotation rotation() const { return rotation_; } | 28 gfx::Display::Rotation rotation() const { return rotation_; } |
29 const gfx::Rect& screen_rect() const { return screen_rect_; } | 29 const gfx::Rect& screen_rect() const { return screen_rect_; } |
30 const gfx::Rect& screen_work_rect() const { return screen_work_rect_; } | 30 const gfx::Rect& screen_work_rect() const { return screen_work_rect_; } |
31 float device_scale_factor() const { return device_scale_factor_; } | 31 float device_scale_factor() const { return device_scale_factor_; } |
32 | 32 |
33 private: | 33 private: |
34 int64_t id_; | 34 int64_t id_; |
35 gfx::Display::Rotation rotation_; | 35 gfx::Display::Rotation rotation_; |
36 gfx::Rect screen_rect_; | 36 gfx::Rect screen_rect_; |
37 gfx::Rect screen_work_rect_; | 37 gfx::Rect screen_work_rect_; |
38 float device_scale_factor_; | 38 float device_scale_factor_; |
39 }; | 39 }; |
40 | 40 |
41 } // namespace win | 41 } // namespace win |
42 } // namespace gfx | 42 } // namespace display |
43 | 43 |
44 #endif // UI_GFX_WIN_DISPLAY_INFO_H_ | 44 #endif // UI_DISPLAY_WIN_DISPLAY_INFO_H_ |
OLD | NEW |