Index: content/gpu/gpu_watchdog_thread.h |
diff --git a/content/gpu/gpu_watchdog_thread.h b/content/gpu/gpu_watchdog_thread.h |
index c766ca3493796949c6f8365c5f879630a8de38e0..61eb3e61de4315cb1b1d8ba7716fa79f835ae85e 100644 |
--- a/content/gpu/gpu_watchdog_thread.h |
+++ b/content/gpu/gpu_watchdog_thread.h |
@@ -12,6 +12,16 @@ |
#include "base/threading/thread.h" |
#include "base/time/time.h" |
#include "content/common/gpu/gpu_watchdog.h" |
+#include "ui/gfx/native_widget_types.h" |
+ |
+#if defined(USE_X11) |
+extern "C" { |
+#include <X11/Xlib.h> |
+#include <X11/Xatom.h> |
+} |
+#include "ui/base/x/x11_util.h" |
+#include "ui/gfx/x/x11_types.h" |
+#endif |
namespace content { |
@@ -62,6 +72,11 @@ class GpuWatchdogThread : public base::Thread, |
void OnAcknowledge(); |
void OnCheck(bool after_suspend); |
void DeliberatelyTerminateToRecoverFromHang(); |
+#if defined(USE_X11) |
+ void CheckXServerActive(); |
+ void SetupXServer(); |
+ void SetupXChangeProp(); |
+#endif |
void OnAddPowerObserver(); |
@@ -93,6 +108,13 @@ class GpuWatchdogThread : public base::Thread, |
FILE* tty_file_; |
#endif |
+#if defined(USE_X11) |
+ bool x_server_active_; |
+ XDisplay* display_; |
+ gfx::AcceleratedWidget window_; |
+ XAtom atom_; |
+#endif |
+ |
base::WeakPtrFactory<GpuWatchdogThread> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(GpuWatchdogThread); |