Chromium Code Reviews| Index: chrome/browser/gtk/toolbar_star_toggle_gtk.cc |
| diff --git a/chrome/browser/gtk/toolbar_star_toggle_gtk.cc b/chrome/browser/gtk/toolbar_star_toggle_gtk.cc |
| index e6edf244bb4f9dcc2e0e438cb25370f343c75067..92cfc1663c1db5ae93fc9253c5115ce945694829 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; |
|
ecattell
2009/04/30 19:55:37
Please initialize basic types (like ints)
Dean McNamee
2009/05/01 15:01:46
It is initialized on the next line, do you still t
|
| + 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()); |