OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DISPLAY_DISPLAY_H_ | 5 #ifndef UI_DISPLAY_DISPLAY_H_ |
6 #define UI_DISPLAY_DISPLAY_H_ | 6 #define UI_DISPLAY_DISPLAY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "ui/display/display_export.h" | 11 #include "ui/display/display_export.h" |
12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
13 | 13 |
| 14 #if !defined(OS_IOS) |
| 15 #include "mojo/public/cpp/bindings/struct_traits.h" // nogncheck |
| 16 #endif |
| 17 |
14 namespace display { | 18 namespace display { |
15 | 19 |
| 20 #if !defined(OS_IOS) |
| 21 namespace mojom { |
| 22 class Display; |
| 23 } |
| 24 #endif |
| 25 |
16 // This class typically, but does not always, correspond to a physical display | 26 // This class typically, but does not always, correspond to a physical display |
17 // connected to the system. A fake Display may exist on a headless system, or a | 27 // connected to the system. A fake Display may exist on a headless system, or a |
18 // Display may correspond to a remote, virtual display. | 28 // Display may correspond to a remote, virtual display. |
19 // | 29 // |
20 // Note: The screen and display currently uses pixel coordinate | 30 // Note: The screen and display currently uses pixel coordinate |
21 // system. For platforms that support DIP (density independent pixel), | 31 // system. For platforms that support DIP (density independent pixel), |
22 // |bounds()| and |work_area| will return values in DIP coordinate | 32 // |bounds()| and |work_area| will return values in DIP coordinate |
23 // system, not in backing pixels. | 33 // system, not in backing pixels. |
24 class DISPLAY_EXPORT Display final { | 34 class DISPLAY_EXPORT Display final { |
25 public: | 35 public: |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 } | 165 } |
156 | 166 |
157 private: | 167 private: |
158 int64_t id_; | 168 int64_t id_; |
159 gfx::Rect bounds_; | 169 gfx::Rect bounds_; |
160 gfx::Rect work_area_; | 170 gfx::Rect work_area_; |
161 float device_scale_factor_; | 171 float device_scale_factor_; |
162 Rotation rotation_; | 172 Rotation rotation_; |
163 TouchSupport touch_support_; | 173 TouchSupport touch_support_; |
164 gfx::Size maximum_cursor_size_; | 174 gfx::Size maximum_cursor_size_; |
| 175 |
| 176 #if !defined(OS_IOS) |
| 177 friend struct mojo::StructTraits<display::mojom::Display, display::Display>; |
| 178 #endif |
165 }; | 179 }; |
166 | 180 |
167 } // namespace display | 181 } // namespace display |
168 | 182 |
169 #endif // UI_DISPLAY_DISPLAY_H_ | 183 #endif // UI_DISPLAY_DISPLAY_H_ |
OLD | NEW |