1
Index: src/chrome/browser/ui/gtk/browser_window_gtk.cc
2
===================================================================
3
--- src/chrome/browser/ui/gtk/browser_window_gtk.cc (revision 158531)
4
+++ src/chrome/browser/ui/gtk/browser_window_gtk.cc (working copy)
6
// gtk_window_get_position() after the last GTK configure-event signal.
7
const int kDebounceTimeoutMilliseconds = 100;
9
+// A window property will be set to reflect the session_id of the
10
+// associated browser window. The session_id is unique among browsers
11
+// for a given session and actually corresponds to the window.id found
12
+// in the extensions api.
13
+char kSessionIdPropertyName[] = "CHROMIUM_LINUX_SESSION_ID_PROPERTY";
15
// Ubuntu patches their verrsion of GTK+ so that there is always a
16
// gripper in the bottom right corner of the window. We dynamically
17
// look up this symbol because it's a non-standard Ubuntu extension to
22
+ // Add a specific property to inform an interested third party
23
+ // of our session id. Interesting in the context of an extension
24
+ // where the session id corresponds to the window.id and is a way
25
+ // to uniquely identify a window based on that (from within a given
27
+ gulong session_id = browser_->session_id().id();
28
+ gdk_property_change(GTK_WIDGET(window_)->window,
29
+ gdk_atom_intern(kSessionIdPropertyName, FALSE),
30
+ gdk_atom_intern("CARDINAL", FALSE),
32
+ GDK_PROP_MODE_REPLACE,
33
+ (guchar *)&session_id,
36
ConnectAccelerators();
38
// Set the initial background color of widgets.