summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/browser_process.h9
-rw-r--r--chrome/browser/browser_process_impl.cc25
-rw-r--r--chrome/browser/browser_process_impl.h3
-rw-r--r--chrome/test/testing_browser_process.cc6
-rw-r--r--chrome/test/testing_browser_process.h4
-rw-r--r--content/browser/browser_thread.cc3
-rw-r--r--content/browser/browser_thread.h7
-rw-r--r--ui/base/x/x11_util.cc46
-rw-r--r--ui/base/x/x11_util.h23
-rw-r--r--ui/gfx/gtk_native_view_id_manager.h11
10 files changed, 2 insertions, 135 deletions
diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
index 9842eed..b8f117e 100644
--- a/chrome/browser/browser_process.h
+++ b/chrome/browser/browser_process.h
@@ -136,15 +136,6 @@ class BrowserProcess {
// Returns the thread that is used for background cache operations.
virtual base::Thread* cache_thread() = 0;
-#if defined(USE_X11)
- // Returns the thread that is used to process UI requests in cases where
- // we can't route the request to the UI thread. Note that this thread
- // should only be used by the IO thread and this method is only safe to call
- // from the UI thread so, if you've ended up here, something has gone wrong.
- // This method is only included for uniformity.
- virtual base::Thread* background_x11_thread() = 0;
-#endif
-
// Returns the thread that is used for health check of all browser threads.
virtual WatchDogThread* watchdog_thread() = 0;
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index f490220..f78054b 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -228,11 +228,6 @@ BrowserProcessImpl::~BrowserProcessImpl() {
// down while the IO and FILE threads are still alive.
browser_policy_connector_.reset();
-#if defined(USE_X11)
- // The IO thread must outlive the BACKGROUND_X11 thread.
- background_x11_thread_.reset();
-#endif
-
// Wait for removing plugin data to finish before shutting down the IO thread.
WaitForPluginDataRemoverToFinish();
@@ -425,16 +420,6 @@ base::Thread* BrowserProcessImpl::cache_thread() {
return cache_thread_.get();
}
-#if defined(USE_X11)
-base::Thread* BrowserProcessImpl::background_x11_thread() {
- DCHECK(CalledOnValidThread());
- // The BACKGROUND_X11 thread is created when the IO thread is created.
- if (!created_io_thread_)
- CreateIOThread();
- return background_x11_thread_.get();
-}
-#endif
-
WatchDogThread* BrowserProcessImpl::watchdog_thread() {
DCHECK(CalledOnValidThread());
if (!created_watchdog_thread_)
@@ -787,16 +772,6 @@ void BrowserProcessImpl::CreateIOThread() {
webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path);
}
-#if defined(USE_X11)
- // The lifetime of the BACKGROUND_X11 thread is a subset of the IO thread so
- // we start it now.
- scoped_ptr<base::Thread> background_x11_thread(
- new BrowserProcessSubThread(BrowserThread::BACKGROUND_X11));
- if (!background_x11_thread->Start())
- return;
- background_x11_thread_.swap(background_x11_thread);
-#endif
-
scoped_ptr<IOThread> thread(new IOThread(
local_state(), net_log_.get(), extension_event_router_forwarder_.get()));
base::Thread::Options options;
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h
index 0415845..2173970 100644
--- a/chrome/browser/browser_process_impl.h
+++ b/chrome/browser/browser_process_impl.h
@@ -55,9 +55,6 @@ class BrowserProcessImpl : public BrowserProcess,
virtual base::Thread* db_thread();
virtual base::Thread* process_launcher_thread();
virtual base::Thread* cache_thread();
-#if defined(USE_X11)
- virtual base::Thread* background_x11_thread();
-#endif
virtual WatchDogThread* watchdog_thread();
#if defined(OS_CHROMEOS)
virtual base::Thread* web_socket_proxy_thread();
diff --git a/chrome/test/testing_browser_process.cc b/chrome/test/testing_browser_process.cc
index 5f55f68..dfacf78 100644
--- a/chrome/test/testing_browser_process.cc
+++ b/chrome/test/testing_browser_process.cc
@@ -46,12 +46,6 @@ IOThread* TestingBrowserProcess::io_thread() {
return NULL;
}
-#if defined(OS_LINUX)
-base::Thread* TestingBrowserProcess::background_x11_thread() {
- return NULL;
-}
-#endif
-
base::Thread* TestingBrowserProcess::file_thread() {
return NULL;
}
diff --git a/chrome/test/testing_browser_process.h b/chrome/test/testing_browser_process.h
index 9a8aa03..e8c378a 100644
--- a/chrome/test/testing_browser_process.h
+++ b/chrome/test/testing_browser_process.h
@@ -54,10 +54,6 @@ class TestingBrowserProcess : public BrowserProcess {
virtual IOThread* io_thread();
-#if defined(OS_LINUX)
- virtual base::Thread* background_x11_thread();
-#endif
-
virtual base::Thread* file_thread();
virtual base::Thread* db_thread();
diff --git a/content/browser/browser_thread.cc b/content/browser/browser_thread.cc
index 31b7e43..de125fb 100644
--- a/content/browser/browser_thread.cc
+++ b/content/browser/browser_thread.cc
@@ -17,9 +17,6 @@ static const char* browser_thread_names[BrowserThread::ID_COUNT] = {
"Chrome_ProcessLauncherThread", // PROCESS_LAUNCHER
"Chrome_CacheThread", // CACHE
"Chrome_IOThread", // IO
-#if defined(USE_X11)
- "Chrome_Background_X11Thread", // BACKGROUND_X11
-#endif
#if defined(OS_CHROMEOS)
"Chrome_WebSocketproxyThread", // WEB_SOCKET_PROXY
#endif
diff --git a/content/browser/browser_thread.h b/content/browser/browser_thread.h
index 3da4012c9..112ce3f 100644
--- a/content/browser/browser_thread.h
+++ b/content/browser/browser_thread.h
@@ -67,13 +67,6 @@ class BrowserThread : public base::Thread {
// This is the thread that processes IPC and network messages.
IO,
-#if defined(USE_X11)
- // This thread has a second connection to the X server and is used to
- // process UI requests when routing the request to the UI thread would risk
- // deadlock.
- BACKGROUND_X11,
-#endif
-
#if defined(OS_CHROMEOS)
// This thread runs websocket to TCP proxy.
// TODO(dilmah): remove this thread, instead implement this functionality
diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
index ee443ac..51f52e2 100644
--- a/ui/base/x/x11_util.cc
+++ b/ui/base/x/x11_util.cc
@@ -609,52 +609,6 @@ void FreePixmap(Display* display, XID pixmap) {
XFreePixmap(display, pixmap);
}
-// Called on BACKGROUND_X11 thread.
-Display* GetSecondaryDisplay() {
- static Display* display = NULL;
- if (!display) {
- display = XOpenDisplay(NULL);
- CHECK(display);
- }
-
- return display;
-}
-
-// Called on BACKGROUND_X11 thread.
-bool GetWindowGeometry(int* x, int* y, unsigned* width, unsigned* height,
- XID window) {
- Window root_window, child_window;
- unsigned border_width, depth;
- int temp;
-
- if (!XGetGeometry(GetSecondaryDisplay(), window, &root_window, &temp, &temp,
- width, height, &border_width, &depth))
- return false;
- if (!XTranslateCoordinates(GetSecondaryDisplay(), window, root_window,
- 0, 0 /* input x, y */, x, y /* output x, y */,
- &child_window))
- return false;
-
- return true;
-}
-
-// Called on BACKGROUND_X11 thread.
-bool GetWindowParent(XID* parent_window, bool* parent_is_root, XID window) {
- XID root_window, *children;
- unsigned num_children;
-
- Status s = XQueryTree(GetSecondaryDisplay(), window, &root_window,
- parent_window, &children, &num_children);
- if (!s)
- return false;
-
- if (children)
- XFree(children);
-
- *parent_is_root = root_window == *parent_window;
- return true;
-}
-
bool GetWindowManagerName(std::string* wm_name) {
DCHECK(wm_name);
int wm_window = 0;
diff --git a/ui/base/x/x11_util.h b/ui/base/x/x11_util.h
index e323d8b..7c985ae 100644
--- a/ui/base/x/x11_util.h
+++ b/ui/base/x/x11_util.h
@@ -144,29 +144,6 @@ void PutARGBImage(Display* display, void* visual, int depth, XID pixmap,
void FreePicture(Display* display, XID picture);
void FreePixmap(Display* display, XID pixmap);
-// These functions are for performing X opertions outside of the UI thread.
-
-// Return the Display for the secondary X connection. We keep a second
-// connection around for making X requests outside of the UI thread.
-// This function may only be called from the BACKGROUND_X11 thread.
-Display* GetSecondaryDisplay();
-
-// Since one cannot include both WebKit header and Xlib headers in the same
-// file (due to collisions), we wrap all the Xlib functions that we need here.
-// These functions must be called on the BACKGROUND_X11 thread since they
-// reference GetSecondaryDisplay().
-
-// Get the position of the given window in screen coordinates as well as its
-// current size.
-bool GetWindowGeometry(int* x, int* y, unsigned* width, unsigned* height,
- XID window);
-
-// Find the immediate parent of an X window.
-//
-// parent_window: (output) the parent window of |window|, or 0.
-// parent_is_root: (output) true iff the parent of |window| is the root window.
-bool GetWindowParent(XID* parent_window, bool* parent_is_root, XID window);
-
// Get the window manager name.
bool GetWindowManagerName(std::string* name);
diff --git a/ui/gfx/gtk_native_view_id_manager.h b/ui/gfx/gtk_native_view_id_manager.h
index 6b544ff..2a651a0 100644
--- a/ui/gfx/gtk_native_view_id_manager.h
+++ b/ui/gfx/gtk_native_view_id_manager.h
@@ -16,16 +16,9 @@ typedef unsigned long XID;
struct _GtkPreserveWindow;
// NativeViewIds are the opaque values which the renderer holds as a reference
-// to a window. These ids are often used in sync calls from the renderer and
-// one cannot terminate sync calls on the UI thread as that can lead to
-// deadlocks.
+// to a window.
//
-// Because of this, we have the BACKGROUND_X11 thread for these calls and this
-// thread has a separate X connection in order to answer them. But one cannot
-// use GTK on multiple threads, so the BACKGROUND_X11 thread deals only in Xlib
-// calls and, thus, XIDs.
-//
-// So we could make NativeViewIds be the X id of the window. However, at the
+// We could make NativeViewIds be the X id of the window. However, at the
// time when we need to tell the renderer about its NativeViewId, an XID isn't
// availible and it goes very much against the grain of the code to make it so.
// Also, we worry that GTK might choose to change the underlying X window id