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

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

Issue 1011173003: x11: Use gfx::XScopedPtr<> in more places. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | ui/display/chromeos/x11/native_display_delegate_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/chromeos/x11/native_display_delegate_x11.h
diff --git a/ui/display/chromeos/x11/native_display_delegate_x11.h b/ui/display/chromeos/x11/native_display_delegate_x11.h
index 09bf22f1037df5a7405ebef4664d31f1e23a0e65..1d7d42a805bfb2badc48d2d35f1596071a243820 100644
--- a/ui/display/chromeos/x11/native_display_delegate_x11.h
+++ b/ui/display/chromeos/x11/native_display_delegate_x11.h
@@ -20,17 +20,15 @@
#include "ui/display/types/native_display_delegate.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/x/x11_types.h"
// Forward declarations for Xlib and Xrandr.
// This is so unused X definitions don't pollute the namespace.
-typedef unsigned long XID;
typedef XID RROutput;
typedef XID RRCrtc;
typedef XID RRMode;
typedef XID Window;
-struct _XDisplay;
-typedef struct _XDisplay Display;
struct _XRROutputInfo;
typedef _XRROutputInfo XRROutputInfo;
struct _XRRScreenResources;
@@ -38,6 +36,10 @@ typedef _XRRScreenResources XRRScreenResources;
struct _XRRCrtcGamma;
typedef _XRRCrtcGamma XRRCrtcGamma;
+extern "C" {
+void XRRFreeScreenResources(XRRScreenResources* resources);
+}
+
namespace ui {
class DisplayModeX11;
@@ -128,11 +130,14 @@ class DISPLAY_EXPORT NativeDisplayDelegateX11 : public NativeDisplayDelegate {
void DrawBackground();
- Display* display_;
+ XDisplay* display_;
Window window_;
// Initialized when the server is grabbed and freed when it's ungrabbed.
- XRRScreenResources* screen_;
+ gfx::XScopedPtr<
+ XRRScreenResources,
+ gfx::XObjectDeleter<XRRScreenResources, void, XRRFreeScreenResources>>
+ screen_;
std::map<RRMode, DisplayModeX11*> modes_;
« no previous file with comments | « no previous file | ui/display/chromeos/x11/native_display_delegate_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698