Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: ui/display/chromeos/x11/display_snapshot_x11.h

Issue 187073002: Refactoring display configuration state to allow generic state objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/display/chromeos/x11/display_mode_x11.cc ('k') | ui/display/chromeos/x11/display_snapshot_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/chromeos/x11/display_snapshot_x11.h
diff --git a/ui/display/chromeos/x11/display_snapshot_x11.h b/ui/display/chromeos/x11/display_snapshot_x11.h
new file mode 100644
index 0000000000000000000000000000000000000000..fe2ff8d123f4fb8f0dc6a32442a62f70b4a7e4f2
--- /dev/null
+++ b/ui/display/chromeos/x11/display_snapshot_x11.h
@@ -0,0 +1,58 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_DISPLAY_CHROMEOS_X11_DISPLAY_SNAPSHOT_X11_H_
+#define UI_DISPLAY_CHROMEOS_X11_DISPLAY_SNAPSHOT_X11_H_
+
+#include "ui/display/chromeos/display_snapshot.h"
+
+// Forward declare from Xlib and Xrandr.
+typedef unsigned long XID;
+typedef XID RROutput;
+typedef XID RRCrtc;
+
+namespace ui {
+
+class DISPLAY_EXPORT DisplaySnapshotX11 : public DisplaySnapshot {
+ public:
+ DisplaySnapshotX11(int64_t display_id,
+ bool has_proper_display_id,
+ const gfx::Point& origin,
+ const gfx::Size& physical_size,
+ OutputType type,
+ bool is_aspect_preserving_scaling,
+ const std::vector<const DisplayMode*>& modes,
+ const DisplayMode* current_mode,
+ const DisplayMode* native_mode,
+ RROutput output,
+ RRCrtc crtc,
+ int index);
+ virtual ~DisplaySnapshotX11();
+
+ RROutput output() const { return output_; }
+ RRCrtc crtc() const { return crtc_; }
+ int index() const { return index_; }
+
+ // DisplaySnapshot overrides:
+ virtual std::string GetDisplayName() OVERRIDE;
+ virtual bool GetOverscanFlag() OVERRIDE;
+ virtual std::string ToString() const OVERRIDE;
+
+ private:
+ RROutput output_;
+
+ // CRTC that should be used for this output. Not necessarily the CRTC
+ // that XRandR reports is currently being used.
+ RRCrtc crtc_;
+
+ // This output's index in the array returned by XRandR. Stable even as
+ // outputs are connected or disconnected.
+ int index_;
+
+ DISALLOW_COPY_AND_ASSIGN(DisplaySnapshotX11);
+};
+
+} // namespace ui
+
+#endif // UI_DISPLAY_CHROMEOS_X11_DISPLAY_SNAPSHOT_X11_H_
« no previous file with comments | « ui/display/chromeos/x11/display_mode_x11.cc ('k') | ui/display/chromeos/x11/display_snapshot_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698