diff options
Diffstat (limited to 'chrome/browser/gtk/info_bubble_gtk.h')
-rw-r--r-- | chrome/browser/gtk/info_bubble_gtk.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/gtk/info_bubble_gtk.h b/chrome/browser/gtk/info_bubble_gtk.h index 7bc45b9..137b395 100644 --- a/chrome/browser/gtk/info_bubble_gtk.h +++ b/chrome/browser/gtk/info_bubble_gtk.h @@ -16,6 +16,7 @@ #include <gtk/gtk.h> #include "base/basictypes.h" +#include "base/gfx/rect.h" #include "chrome/common/notification_registrar.h" class GtkThemeProvider; @@ -70,6 +71,9 @@ class InfoBubbleGtk : public NotificationObserver { const gfx::Rect& rect, GtkWidget* content); + // Sets |screen_x_| according to our allocation and |rect_|. + void UpdateScreenX(); + // Sets the delegate. void set_delegate(InfoBubbleGtkDelegate* delegate) { delegate_ = delegate; } @@ -86,6 +90,13 @@ class InfoBubbleGtk : public NotificationObserver { } gboolean HandleEscape(); + static void HandleSizeAllocateThunk(GtkWidget* widget, + GtkAllocation* allocation, + gpointer user_data) { + reinterpret_cast<InfoBubbleGtk*>(user_data)->HandleSizeAllocate(); + } + void HandleSizeAllocate(); + static gboolean HandleConfigureThunk(GtkWidget* widget, GdkEventConfigure* event, gpointer user_data) { @@ -129,6 +140,9 @@ class InfoBubbleGtk : public NotificationObserver { // The accel group attached to |window_|, to handle closing with escape. GtkAccelGroup* accel_group_; + // The rectangle that we use to calculate |screen_x_| and |screen_y_|. + gfx::Rect rect_; + // Where we want our window to be positioned on the screen. int screen_x_; int screen_y_; |