Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1834)

Unified Diff: chrome/browser/gtk/browser_actions_toolbar_gtk.cc

Issue 326017: GTK: Compute infobubble rects correctly. (Closed)
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_actions_toolbar_gtk.cc
diff --git a/chrome/browser/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/gtk/browser_actions_toolbar_gtk.cc
index 85ea7692fe3f24f30645c9dfd6086543e9431c90..74b46c299407f5d5d89ccceb334e4fa52b1dac52 100644
--- a/chrome/browser/gtk/browser_actions_toolbar_gtk.cc
+++ b/chrome/browser/gtk/browser_actions_toolbar_gtk.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/gtk/gtk_theme_provider.h"
#include "chrome/browser/profile.h"
#include "chrome/common/extensions/extension.h"
+#include "chrome/common/gtk_util.h"
#include "chrome/common/notification_details.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_source.h"
@@ -127,9 +128,10 @@ class BrowserActionButton : public NotificationObserver,
static void OnButtonClicked(GtkWidget* widget, BrowserActionButton* action) {
if (action->extension_->browser_action()->is_popup()) {
- ExtensionPopupGtk::Show(action->extension_->browser_action()->popup_url(),
- action->browser_, gfx::Rect(widget->allocation));
-
+ ExtensionPopupGtk::Show(
+ action->extension_->browser_action()->popup_url(),
+ action->browser_,
+ gtk_util::GetWidgetRectRelativeToToplevel(widget));
} else {
ExtensionBrowserEventRouter::GetInstance()->BrowserActionExecuted(
action->browser_->profile(), action->extension_->id(),
« no previous file with comments | « no previous file | chrome/browser/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698