Index: ui/surface/transport_dib.h |
diff --git a/ui/surface/transport_dib.h b/ui/surface/transport_dib.h |
index 535567aec016a3ffffa7a2233d4f035cc19e018c..c07f21ece28991dc8df7abcb17c60f7b3cb4bff1 100644 |
--- a/ui/surface/transport_dib.h |
+++ b/ui/surface/transport_dib.h |
@@ -110,6 +110,19 @@ class SURFACE_EXPORT TransportDIB { |
static int fake_handle = 10; |
return fake_handle++; |
} |
+#elif defined(USE_NATIVE_SURFACE_LINUX) |
+ typedef int Handle; |
+ typedef int Id; |
+ // Returns a default, invalid handle, that is meant to indicate a missing |
+ // Transport DIB. |
+ static Handle DefaultHandleValue() { return -1; } |
+ |
+ // Returns a value that is ONLY USEFUL FOR TESTS WHERE IT WON'T BE |
+ // ACTUALLY USED AS A REAL HANDLE. |
+ static Handle GetFakeHandleForTest() { |
+ static int fake_handle = 10; |
+ return fake_handle++; |
+ } |
#else // OS_POSIX |
typedef base::SharedMemoryHandle Handle; |
// On POSIX, the inode number of the backing file is used as an id. |
@@ -198,7 +211,11 @@ class SURFACE_EXPORT TransportDIB { |
// Decreases the inflight counter, and deletes the transport DIB if it is |
// detached. |
void DecreaseInFlightCounter(); |
+#endif |
+#if defined(TOOLKIT_GTK) || \ |
+ (defined(OS_LINUX) && defined(USE_AURA) && defined(USE_X11)) || \ |
+ defined(USE_NATIVE_SURFACE_LINUX) |
// Deletes this transport DIB and detaches the shared memory once the |
// |inflight_counter_| is zero. |
void Detach(); |