| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 ASH_COMMON_DISPLAY_DISPLAY_INFO_H_ | 5 #ifndef UI_DISPLAY_CHROMEOS_DISPLAY_INFO_H_ |
| 6 #define ASH_COMMON_DISPLAY_DISPLAY_INFO_H_ | 6 #define UI_DISPLAY_CHROMEOS_DISPLAY_INFO_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "ash/ash_export.h" | |
| 15 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 16 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 17 #include "ui/display/display.h" | 16 #include "ui/display/display.h" |
| 17 #include "ui/display/display_export.h" |
| 18 #include "ui/display/types/display_constants.h" | 18 #include "ui/display/types/display_constants.h" |
| 19 #include "ui/gfx/geometry/insets.h" | 19 #include "ui/gfx/geometry/insets.h" |
| 20 #include "ui/gfx/geometry/rect.h" | 20 #include "ui/gfx/geometry/rect.h" |
| 21 | 21 |
| 22 namespace ash { | 22 namespace ui { |
| 23 | 23 |
| 24 // A class that represents the display's mode info. | 24 // A class that represents the display's mode info. |
| 25 class ASH_EXPORT ManagedDisplayMode | 25 class DISPLAY_EXPORT ManagedDisplayMode |
| 26 : public base::RefCounted<ManagedDisplayMode> { | 26 : public base::RefCounted<ManagedDisplayMode> { |
| 27 public: | 27 public: |
| 28 ManagedDisplayMode(); | 28 ManagedDisplayMode(); |
| 29 | 29 |
| 30 ManagedDisplayMode(const gfx::Size& size); | 30 ManagedDisplayMode(const gfx::Size& size); |
| 31 | 31 |
| 32 ManagedDisplayMode(const gfx::Size& size, | 32 ManagedDisplayMode(const gfx::Size& size, |
| 33 float refresh_rate, | 33 float refresh_rate, |
| 34 bool is_interlaced, | 34 bool is_interlaced, |
| 35 bool native); | 35 bool native); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 float ui_scale_; // The UI scale factor of the mode. | 67 float ui_scale_; // The UI scale factor of the mode. |
| 68 float device_scale_factor_; // The device scale factor of the mode. | 68 float device_scale_factor_; // The device scale factor of the mode. |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(ManagedDisplayMode); | 70 DISALLOW_COPY_AND_ASSIGN(ManagedDisplayMode); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 // DisplayInfo contains metadata for each display. This is used to | 73 // DisplayInfo contains metadata for each display. This is used to |
| 74 // create |display::Display| as well as to maintain extra infomation | 74 // create |display::Display| as well as to maintain extra infomation |
| 75 // to manage displays in ash environment. | 75 // to manage displays in ash environment. |
| 76 // This class is intentionally made copiable. | 76 // This class is intentionally made copiable. |
| 77 class ASH_EXPORT DisplayInfo { | 77 class DISPLAY_EXPORT DisplayInfo { |
| 78 public: | 78 public: |
| 79 using ManagedDisplayModeList = std::vector<scoped_refptr<ManagedDisplayMode>>; | 79 using ManagedDisplayModeList = std::vector<scoped_refptr<ManagedDisplayMode>>; |
| 80 | 80 |
| 81 // Creates a DisplayInfo from string spec. 100+200-1440x800 creates display | 81 // Creates a DisplayInfo from string spec. 100+200-1440x800 creates display |
| 82 // whose size is 1440x800 at the location (100, 200) in host coordinates. | 82 // whose size is 1440x800 at the location (100, 200) in host coordinates. |
| 83 // The format is | 83 // The format is |
| 84 // | 84 // |
| 85 // [origin-]widthxheight[*device_scale_factor][#resolutions list] | 85 // [origin-]widthxheight[*device_scale_factor][#resolutions list] |
| 86 // [/<properties>][@ui-scale] | 86 // [/<properties>][@ui-scale] |
| 87 // | 87 // |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 std::vector<ui::ColorCalibrationProfile> available_color_profiles_; | 350 std::vector<ui::ColorCalibrationProfile> available_color_profiles_; |
| 351 | 351 |
| 352 // Maximum cursor size. | 352 // Maximum cursor size. |
| 353 gfx::Size maximum_cursor_size_; | 353 gfx::Size maximum_cursor_size_; |
| 354 | 354 |
| 355 // If you add a new member, you need to update Copy(). | 355 // If you add a new member, you need to update Copy(). |
| 356 }; | 356 }; |
| 357 | 357 |
| 358 // Resets the synthesized display id for testing. This | 358 // Resets the synthesized display id for testing. This |
| 359 // is necessary to avoid overflowing the output index. | 359 // is necessary to avoid overflowing the output index. |
| 360 ASH_EXPORT void ResetDisplayIdForTest(); | 360 void DISPLAY_EXPORT ResetDisplayIdForTest(); |
| 361 | 361 |
| 362 } // namespace ash | 362 } // namespace ui |
| 363 | 363 |
| 364 #endif // ASH_COMMON_DISPLAY_DISPLAY_INFO_H_ | 364 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_INFO_H_ |
| OLD | NEW |