Index: gfx/gtk_native_view_id_manager.h |
diff --git a/gfx/gtk_native_view_id_manager.h b/gfx/gtk_native_view_id_manager.h |
index 513537a7eced09dc11f997583af42a15cb92ad2b..3643552944b33f4d2012137aececaf792b575894 100644 |
--- a/gfx/gtk_native_view_id_manager.h |
+++ b/gfx/gtk_native_view_id_manager.h |
@@ -70,6 +70,14 @@ class GtkNativeViewManager { |
// returns: true if |id| is a valid id, false otherwise. |
bool GetPermanentXIDForId(XID* xid, gfx::NativeViewId id); |
+ // Must be called from the UI thread because we may need to access a |
+ // GtkWidget or destroy a GdkWindow. |
+ // |
+ // If the widget associated with the XID is still alive, release the lock |
piman
2010/11/29 21:59:01
You're talking about a lock here, but it's unclear
|
+ // on the XID associated with a widget. Otherwise, destroy the GdkWindow |
+ // associated with the XID. |
+ void ReleasePermanentXID(XID xid); |
+ |
// These are actually private functions, but need to be called from statics. |
void OnRealize(gfx::NativeView widget); |
void OnUnrealize(gfx::NativeView widget); |
@@ -105,6 +113,16 @@ class GtkNativeViewManager { |
std::map<gfx::NativeView, gfx::NativeViewId> native_view_to_id_; |
std::map<gfx::NativeViewId, NativeViewInfo> id_to_info_; |
+ // Mapping from X window to associated widget. |
+ // |
+ // In general, several GTK widgets may share the same X window. We assume |
+ // that is not true of widgets in this registry. |
+ // |
+ // An XID will map to NULL, if the widget had been instructed to preserve |
+ // it's X window, but was destroyed. In this case, the destruction is deferred |
piman
2010/11/29 21:59:01
it's->its
jonathan.backer
2010/11/30 13:09:31
Done.
|
+ // until a call to ReleasePermXID. |
piman
2010/11/29 21:59:01
ReleasePermXID -> ReleasePermanentXID
jonathan.backer
2010/11/30 13:09:31
Done.
|
+ std::map<XID, gfx::NativeView> xid_to_native_view_; |
+ |
DISALLOW_COPY_AND_ASSIGN(GtkNativeViewManager); |
}; |