diff options
Diffstat (limited to 'chrome/browser/gtk/toolbar_star_toggle_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/toolbar_star_toggle_gtk.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/gtk/toolbar_star_toggle_gtk.cc b/chrome/browser/gtk/toolbar_star_toggle_gtk.cc index e6edf24..92cfc16 100644 --- a/chrome/browser/gtk/toolbar_star_toggle_gtk.cc +++ b/chrome/browser/gtk/toolbar_star_toggle_gtk.cc @@ -4,6 +4,8 @@ #include "chrome/browser/gtk/toolbar_star_toggle_gtk.h" +#include "base/gfx/rect.h" +#include "chrome/browser/gtk/bookmark_bubble_gtk.h" #include "chrome/common/resource_bundle.h" #include "grit/theme_resources.h" @@ -27,6 +29,22 @@ ToolbarStarToggleGtk::~ToolbarStarToggleGtk() { widget_.Destroy(); } +void ToolbarStarToggleGtk::ShowStarBubble(const GURL& url, + bool newly_bookmarked) { + GtkWidget* widget = widget_.get(); + gint x, y; + gdk_window_get_origin(widget->window, &x, &y); + x += widget->allocation.x; + y += widget->allocation.y; + gint width = widget->allocation.width; + gint height = widget->allocation.height; + + BookmarkBubbleGtk::Show(gfx::Rect(x, y, width, height), + NULL, + url, + newly_bookmarked); +} + void ToolbarStarToggleGtk::SetStarred(bool starred) { is_starred_ = starred; gtk_widget_queue_draw(widget_.get()); |