| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TYPES_DISPLAY_SNAPSHOT_H_ | 5 #ifndef UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ |
| 6 #define UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ | 6 #define UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "ui/display/types/display_constants.h" | 14 #include "ui/display/types/display_constants.h" |
| 15 #include "ui/display/types/display_mode.h" | 15 #include "ui/display/types/display_mode.h" |
| 16 #include "ui/gfx/buffer_types.h" | 16 #include "ui/gfx/buffer_types.h" |
| 17 #include "ui/gfx/geometry/point.h" | 17 #include "ui/gfx/geometry/point.h" |
| 18 #include "ui/gfx/geometry/size.h" | 18 #include "ui/gfx/geometry/size.h" |
| 19 | 19 |
| 20 namespace ui { | 20 namespace display { |
| 21 | 21 |
| 22 // This class represents the state of a display at one point in time. Platforms | 22 // This class represents the state of a display at one point in time. Platforms |
| 23 // will extend this class in order to add platform specific configuration and | 23 // will extend this class in order to add platform specific configuration and |
| 24 // identifiers required to configure this display. | 24 // identifiers required to configure this display. |
| 25 class DISPLAY_TYPES_EXPORT DisplaySnapshot { | 25 class DISPLAY_TYPES_EXPORT DisplaySnapshot { |
| 26 public: | 26 public: |
| 27 using DisplayModeList = std::vector<std::unique_ptr<const DisplayMode>>; | 27 using DisplayModeList = std::vector<std::unique_ptr<const DisplayMode>>; |
| 28 | 28 |
| 29 DisplaySnapshot(int64_t display_id, | 29 DisplaySnapshot(int64_t display_id, |
| 30 const gfx::Point& origin, | 30 const gfx::Point& origin, |
| 31 const gfx::Size& physical_size, | 31 const gfx::Size& physical_size, |
| 32 DisplayConnectionType type, | 32 DisplayConnectionType type, |
| 33 bool is_aspect_preserving_scaling, | 33 bool is_aspect_preserving_scaling, |
| 34 bool has_overscan, | 34 bool has_overscan, |
| 35 bool has_color_correction_matrix, | 35 bool has_color_correction_matrix, |
| 36 std::string display_name, | 36 std::string display_name, |
| 37 const base::FilePath& sys_path, | 37 const base::FilePath& sys_path, |
| 38 DisplayModeList modes, | 38 DisplayModeList modes, |
| 39 const std::vector<uint8_t>& edid, | 39 const std::vector<uint8_t>& edid, |
| 40 const DisplayMode* current_mode, | 40 const DisplayMode* current_mode, |
| 41 const DisplayMode* native_mode); | 41 const DisplayMode* native_mode); |
| 42 virtual ~DisplaySnapshot(); | 42 virtual ~DisplaySnapshot(); |
| 43 | 43 |
| 44 const gfx::Point& origin() const { return origin_; } | 44 const gfx::Point& origin() const { return origin_; } |
| 45 const gfx::Size& physical_size() const { return physical_size_; } | 45 const gfx::Size& physical_size() const { return physical_size_; } |
| 46 ui::DisplayConnectionType type() const { return type_; } | 46 DisplayConnectionType type() const { return type_; } |
| 47 bool is_aspect_preserving_scaling() const { | 47 bool is_aspect_preserving_scaling() const { |
| 48 return is_aspect_preserving_scaling_; | 48 return is_aspect_preserving_scaling_; |
| 49 } | 49 } |
| 50 bool has_overscan() const { return has_overscan_; } | 50 bool has_overscan() const { return has_overscan_; } |
| 51 std::string display_name() const { return display_name_; } | 51 std::string display_name() const { return display_name_; } |
| 52 const base::FilePath& sys_path() const { return sys_path_; } | 52 const base::FilePath& sys_path() const { return sys_path_; } |
| 53 | 53 |
| 54 int64_t display_id() const { return display_id_; } | 54 int64_t display_id() const { return display_id_; } |
| 55 | 55 |
| 56 const DisplayMode* current_mode() const { return current_mode_; } | 56 const DisplayMode* current_mode() const { return current_mode_; } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // Combination of manufacturer and product code. | 117 // Combination of manufacturer and product code. |
| 118 int64_t product_id_; | 118 int64_t product_id_; |
| 119 | 119 |
| 120 // Maximum supported cursor size on this display. | 120 // Maximum supported cursor size on this display. |
| 121 gfx::Size maximum_cursor_size_; | 121 gfx::Size maximum_cursor_size_; |
| 122 | 122 |
| 123 private: | 123 private: |
| 124 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshot); | 124 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshot); |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace ui | 127 } // namespace display |
| 128 | 128 |
| 129 #endif // UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ | 129 #endif // UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ |
| OLD | NEW |