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 CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_ |
6 #define CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_ | 6 #define CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_ |
7 | 7 |
| 8 #include "content/common/content_export.h" |
8 #include "content/public/common/screen_orientation_values.h" | 9 #include "content/public/common/screen_orientation_values.h" |
9 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
| 11 #include "ui/gfx/icc_profile.h" |
10 | 12 |
11 namespace content { | 13 namespace content { |
12 | 14 |
13 // Information about the screen on which a RenderWidget is being displayed. This | 15 // Information about the screen on which a RenderWidget is being displayed. This |
14 // is the content counterpart to WebScreenInfo in blink. | 16 // is the content counterpart to WebScreenInfo in blink. |
15 struct ScreenInfo { | 17 struct CONTENT_EXPORT ScreenInfo { |
| 18 ScreenInfo(); |
| 19 ScreenInfo(const ScreenInfo& other); |
| 20 ~ScreenInfo(); |
| 21 |
16 // Device scale factor. Specifies the ratio between physical and logical | 22 // Device scale factor. Specifies the ratio between physical and logical |
17 // pixels. | 23 // pixels. |
18 float device_scale_factor = 1.f; | 24 float device_scale_factor = 1.f; |
19 | 25 |
| 26 // The ICC profile of the output display. |
| 27 gfx::ICCProfile icc_profile; |
| 28 |
20 // The screen depth in bits per pixel | 29 // The screen depth in bits per pixel |
21 uint32_t depth = 0; | 30 uint32_t depth = 0; |
22 | 31 |
23 // The bits per colour component. This assumes that the colours are balanced | 32 // The bits per colour component. This assumes that the colours are balanced |
24 // equally. | 33 // equally. |
25 uint32_t depth_per_component = 0; | 34 uint32_t depth_per_component = 0; |
26 | 35 |
27 // This can be true for black and white printers | 36 // This can be true for black and white printers |
28 bool is_monochrome = false; | 37 bool is_monochrome = false; |
29 | 38 |
(...skipping 12 matching lines...) Expand all Loading... |
42 // It is the opposite of the physical rotation. | 51 // It is the opposite of the physical rotation. |
43 uint16_t orientation_angle = 0; | 52 uint16_t orientation_angle = 0; |
44 | 53 |
45 bool operator==(const ScreenInfo& other) const; | 54 bool operator==(const ScreenInfo& other) const; |
46 bool operator!=(const ScreenInfo& other) const; | 55 bool operator!=(const ScreenInfo& other) const; |
47 }; | 56 }; |
48 | 57 |
49 } // namespace content | 58 } // namespace content |
50 | 59 |
51 #endif // CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_ | 60 #endif // CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_ |
OLD | NEW |