| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_DISPLAY_CHROMEOS_X11_DISPLAY_SNAPSHOT_X11_H_ | |
| 6 #define UI_DISPLAY_CHROMEOS_X11_DISPLAY_SNAPSHOT_X11_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "ui/display/display_export.h" | |
| 12 #include "ui/display/types/display_snapshot.h" | |
| 13 | |
| 14 // Forward declare from Xlib and Xrandr. | |
| 15 typedef unsigned long XID; | |
| 16 typedef XID RROutput; | |
| 17 typedef XID RRCrtc; | |
| 18 | |
| 19 namespace ui { | |
| 20 | |
| 21 class DISPLAY_EXPORT DisplaySnapshotX11 : public DisplaySnapshot { | |
| 22 public: | |
| 23 DisplaySnapshotX11(int64_t display_id, | |
| 24 const gfx::Point& origin, | |
| 25 const gfx::Size& physical_size, | |
| 26 DisplayConnectionType type, | |
| 27 bool is_aspect_preserving_scaling, | |
| 28 bool has_overscan, | |
| 29 std::string display_name, | |
| 30 std::vector<std::unique_ptr<const DisplayMode>> modes, | |
| 31 const std::vector<uint8_t>& edid, | |
| 32 const DisplayMode* current_mode, | |
| 33 const DisplayMode* native_mode, | |
| 34 RROutput output, | |
| 35 RRCrtc crtc, | |
| 36 int index); | |
| 37 ~DisplaySnapshotX11() override; | |
| 38 | |
| 39 RROutput output() const { return output_; } | |
| 40 RRCrtc crtc() const { return crtc_; } | |
| 41 int index() const { return index_; } | |
| 42 | |
| 43 // DisplaySnapshot overrides: | |
| 44 std::string ToString() const override; | |
| 45 | |
| 46 private: | |
| 47 RROutput output_; | |
| 48 | |
| 49 // CRTC that should be used for this output. Not necessarily the CRTC | |
| 50 // that XRandR reports is currently being used. | |
| 51 RRCrtc crtc_; | |
| 52 | |
| 53 // This output's index in the array returned by XRandR. Stable even as | |
| 54 // outputs are connected or disconnected. | |
| 55 int index_; | |
| 56 | |
| 57 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshotX11); | |
| 58 }; | |
| 59 | |
| 60 } // namespace ui | |
| 61 | |
| 62 #endif // UI_DISPLAY_CHROMEOS_X11_DISPLAY_SNAPSHOT_X11_H_ | |
| OLD | NEW |