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

Unified Diff: webkit/tools/test_shell/test_shell_x11.cc

Issue 67145: Linux: move X operations from the IO to UI2 thread. (Closed)
Patch Set: ... Created 11 years, 8 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 | « webkit/tools/test_shell/test_shell_x11.h ('k') | webkit/tools/test_shell/webwidget_host_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_x11.cc
diff --git a/webkit/tools/test_shell/test_shell_x11.cc b/webkit/tools/test_shell/test_shell_x11.cc
new file mode 100644
index 0000000000000000000000000000000000000000..865954b5c4cbabe3a8811bdb7e908864684d90d3
--- /dev/null
+++ b/webkit/tools/test_shell/test_shell_x11.cc
@@ -0,0 +1,19 @@
+#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
+
+#include "webkit/tools/test_shell/test_shell_x11.h"
+
+namespace test_shell_x11 {
+
+Display* GtkWidgetGetDisplay(GtkWidget* widget) {
+ GdkDisplay* gdk_display = gtk_widget_get_display(widget);
+ return gdk_x11_display_get_xdisplay(gdk_display);
+}
+
+int GtkWidgetGetScreenNum(GtkWidget* widget) {
+ GdkDisplay* gdk_display = gtk_widget_get_display(widget);
+ GdkScreen* gdk_screen = gdk_display_get_default_screen(gdk_display);
+ return gdk_x11_screen_get_screen_number(gdk_screen);
+}
+
+} // namespace test_shell_x11
« no previous file with comments | « webkit/tools/test_shell/test_shell_x11.h ('k') | webkit/tools/test_shell/webwidget_host_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698