| 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" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // Resets the caches used to determine if a device scale factor is being | 84 // Resets the caches used to determine if a device scale factor is being |
| 85 // forced from the command line via "--force-device-scale-factor", and thus | 85 // forced from the command line via "--force-device-scale-factor", and thus |
| 86 // ensures that the command line is reevaluated. | 86 // ensures that the command line is reevaluated. |
| 87 static void ResetForceDeviceScaleFactorForTesting(); | 87 static void ResetForceDeviceScaleFactorForTesting(); |
| 88 | 88 |
| 89 // Sets/Gets unique identifier associated with the display. | 89 // Sets/Gets unique identifier associated with the display. |
| 90 // -1 means invalid display and it doesn't not exit. | 90 // -1 means invalid display and it doesn't not exit. |
| 91 int64_t id() const { return id_; } | 91 int64_t id() const { return id_; } |
| 92 void set_id(int64_t id) { id_ = id; } | 92 void set_id(int64_t id) { id_ = id; } |
| 93 | 93 |
| 94 // Gets/Sets the display's bounds in display::Screen's coordinates. | 94 // Gets/Sets the display's bounds in Screen's coordinates. |
| 95 const gfx::Rect& bounds() const { return bounds_; } | 95 const gfx::Rect& bounds() const { return bounds_; } |
| 96 void set_bounds(const gfx::Rect& bounds) { bounds_ = bounds; } | 96 void set_bounds(const gfx::Rect& bounds) { bounds_ = bounds; } |
| 97 | 97 |
| 98 // Gets/Sets the display's work area in display::Screen's coordinates. | 98 // Gets/Sets the display's work area in Screen's coordinates. |
| 99 const gfx::Rect& work_area() const { return work_area_; } | 99 const gfx::Rect& work_area() const { return work_area_; } |
| 100 void set_work_area(const gfx::Rect& work_area) { work_area_ = work_area; } | 100 void set_work_area(const gfx::Rect& work_area) { work_area_ = work_area; } |
| 101 | 101 |
| 102 // Output device's pixel scale factor. This specifies how much the | 102 // Output device's pixel scale factor. This specifies how much the |
| 103 // UI should be scaled when the actual output has more pixels than | 103 // UI should be scaled when the actual output has more pixels than |
| 104 // standard displays (which is around 100~120dpi.) The potential return | 104 // standard displays (which is around 100~120dpi.) The potential return |
| 105 // values depend on each platforms. | 105 // values depend on each platforms. |
| 106 float device_scale_factor() const { return device_scale_factor_; } | 106 float device_scale_factor() const { return device_scale_factor_; } |
| 107 void set_device_scale_factor(float scale) { device_scale_factor_ = scale; } | 107 void set_device_scale_factor(float scale) { device_scale_factor_ = scale; } |
| 108 | 108 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 float device_scale_factor_; | 197 float device_scale_factor_; |
| 198 Rotation rotation_ = ROTATE_0; | 198 Rotation rotation_ = ROTATE_0; |
| 199 TouchSupport touch_support_ = TOUCH_SUPPORT_UNKNOWN; | 199 TouchSupport touch_support_ = TOUCH_SUPPORT_UNKNOWN; |
| 200 gfx::Size maximum_cursor_size_; | 200 gfx::Size maximum_cursor_size_; |
| 201 gfx::ICCProfile icc_profile_; | 201 gfx::ICCProfile icc_profile_; |
| 202 int color_depth_; | 202 int color_depth_; |
| 203 int depth_per_component_; | 203 int depth_per_component_; |
| 204 bool is_monochrome_ = false; | 204 bool is_monochrome_ = false; |
| 205 | 205 |
| 206 #if !defined(OS_IOS) | 206 #if !defined(OS_IOS) |
| 207 friend struct mojo::StructTraits<display::mojom::DisplayDataView, | 207 friend struct mojo::StructTraits<mojom::DisplayDataView, Display>; |
| 208 display::Display>; | |
| 209 #endif | 208 #endif |
| 210 }; | 209 }; |
| 211 | 210 |
| 212 } // namespace display | 211 } // namespace display |
| 213 | 212 |
| 214 #endif // UI_DISPLAY_DISPLAY_H_ | 213 #endif // UI_DISPLAY_DISPLAY_H_ |
| OLD | NEW |