diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-31 22:29:54 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-31 22:29:54 +0000 |
commit | b7b678f549e7a622615e6488d8e36fe998f85aec (patch) | |
tree | f1b9c196f11d0d6f365b02f03f39a74b73838a0f /ui/gfx/gtk_native_view_id_manager.h | |
parent | fde205d647c882dc36d2753d0b3e4ac342a89b19 (diff) | |
download | chromium_src-b7b678f549e7a622615e6488d8e36fe998f85aec.zip chromium_src-b7b678f549e7a622615e6488d8e36fe998f85aec.tar.gz chromium_src-b7b678f549e7a622615e6488d8e36fe998f85aec.tar.bz2 |
Remove the use of the X11 background thread and instead handle sync
render messages on the UI thread.
This avoids a lot of complexity by allowing us to use gdk methods to
get window and screen information and fixes issue 80096.
Also remove the unrealize lock since we're only operating on the UI
thread.
There will be follow up patches to:
- Remove the X11 background thread.
- Update GtkNativeViewManager to be non-thread safe and remove all the locking
since it appears to only be used on the UI thread now.
- Remove functions in x11_util.* that are no longer used.
BUG=80096
TEST=See test case in issue 80096. Make sure that the custom frame
is disabled.
Review URL: http://codereview.chromium.org/7085009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87381 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/gtk_native_view_id_manager.h')
-rw-r--r-- | ui/gfx/gtk_native_view_id_manager.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ui/gfx/gtk_native_view_id_manager.h b/ui/gfx/gtk_native_view_id_manager.h index 6ea16a2..6b544ff 100644 --- a/ui/gfx/gtk_native_view_id_manager.h +++ b/ui/gfx/gtk_native_view_id_manager.h @@ -61,6 +61,11 @@ class GtkNativeViewManager { // |*xid| is set to 0. bool GetXIDForId(XID* xid, gfx::NativeViewId id); + // May be called from the UI thread: + // + // Same as GetXIDForId except it returns the NativeView (GtkWidget*). + bool GetNativeViewForId(gfx::NativeView* xid, gfx::NativeViewId id); + // Must be called from the UI thread because we may need the associated // widget to create a window. // @@ -90,8 +95,6 @@ class GtkNativeViewManager { void OnUnrealize(gfx::NativeView widget); void OnDestroy(gfx::NativeView widget); - base::Lock& unrealize_lock() { return unrealize_lock_; } - private: // This object is a singleton: GtkNativeViewManager(); @@ -107,11 +110,6 @@ class GtkNativeViewManager { gfx::NativeViewId GetWidgetId(gfx::NativeView id); - // This lock can be used to block GTK from unrealizing windows. This is needed - // when the BACKGROUND_X11 thread is using a window obtained via GetXIDForId, - // and can't allow the X11 resource to be deleted. - base::Lock unrealize_lock_; - // protects native_view_to_id_ and id_to_info_ base::Lock lock_; |