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

Unified Diff: ui/base/x/x11_window_cache_event_source.h

Issue 2199063003: Linux: Add xcb FD to glib event loop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor Created 4 years, 4 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/base/x/x11_window_cache.cc ('k') | ui/base/x/x11_window_cache_event_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/x11_window_cache_event_source.h
diff --git a/ui/base/x/x11_window_cache_event_source.h b/ui/base/x/x11_window_cache_event_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..b49f680301531708786d5a68e9ef1bb007f7eb76
--- /dev/null
+++ b/ui/base/x/x11_window_cache_event_source.h
@@ -0,0 +1,36 @@
+// Copyright 2016 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_BASE_X_X11_WINDOW_CACHE_EVENT_SOURCE_H_
+#define UI_BASE_X_X11_WINDOW_CACHE_EVENT_SOURCE_H_
+
+#ifndef USE_GLIB
+#error "XWindowCache is only used on desktop Linux builds."
+#endif
+
+#include <memory>
+
+#include "ui/base/x/ui_base_x_export.h"
+
+typedef struct _GPollFD GPollFD;
+typedef struct _GSource GSource;
+
+namespace ui {
+
+class XWindowCache;
+
+// Maintain a
+class UI_BASE_X_EXPORT XWindowCacheEventSource {
+ public:
+ XWindowCacheEventSource(XWindowCache* cache);
+ ~XWindowCacheEventSource();
+
+ private:
+ GSource* g_source_ = nullptr;
+ std::unique_ptr<GPollFD> g_poll_;
+};
+
+} // namespace ui
+
+#endif // UI_BASE_X_X11_WINDOW_CACHE_EVENT_SOURCE_H_
« no previous file with comments | « ui/base/x/x11_window_cache.cc ('k') | ui/base/x/x11_window_cache_event_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698