diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-07 21:00:33 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-07 21:00:33 +0000 |
commit | c4d6f87b0cf6ee6d8478a79875700600b049d1df (patch) | |
tree | e3fd77172b81c7d83ac495d96f973881946c7482 /chrome/browser/gtk/extension_popup_gtk.cc | |
parent | 875f8f9b0757f2029b21cead7822db116ea525e0 (diff) | |
download | chromium_src-c4d6f87b0cf6ee6d8478a79875700600b049d1df.zip chromium_src-c4d6f87b0cf6ee6d8478a79875700600b049d1df.tar.gz chromium_src-c4d6f87b0cf6ee6d8478a79875700600b049d1df.tar.bz2 |
GTK: position info bubbles relative to a subwidget, rather than the toplevel window.
(Client code can still use a toplevel widget as the anchor.)
BUG=40068
TEST=tried all popups in LTR and RTL
Review URL: http://codereview.chromium.org/1575019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43876 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/extension_popup_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/extension_popup_gtk.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/gtk/extension_popup_gtk.cc b/chrome/browser/gtk/extension_popup_gtk.cc index fad0c0b..c2a68ec 100644 --- a/chrome/browser/gtk/extension_popup_gtk.cc +++ b/chrome/browser/gtk/extension_popup_gtk.cc @@ -22,12 +22,12 @@ ExtensionPopupGtk* ExtensionPopupGtk::current_extension_popup_ = NULL; ExtensionPopupGtk::ExtensionPopupGtk(Browser* browser, ExtensionHost* host, - const gfx::Rect& relative_to, + GtkWidget* anchor, bool inspect) : browser_(browser), bubble_(NULL), host_(host), - relative_to_(relative_to), + anchor_(anchor), being_inspected_(inspect), method_factory_(this) { // If the host had somehow finished loading, then we'd miss the notification @@ -103,8 +103,8 @@ void ExtensionPopupGtk::ShowPopup() { !base::i18n::IsRTL() ? InfoBubbleGtk::ARROW_LOCATION_TOP_RIGHT : InfoBubbleGtk::ARROW_LOCATION_TOP_LEFT; - bubble_ = InfoBubbleGtk::Show(browser_->window()->GetNativeHandle(), - relative_to_, + bubble_ = InfoBubbleGtk::Show(anchor_, + NULL, host_->view()->native_view(), arrow_location, false, // match_system_theme @@ -131,7 +131,7 @@ void ExtensionPopupGtk::InfoBubbleClosing(InfoBubbleGtk* bubble, // static void ExtensionPopupGtk::Show(const GURL& url, Browser* browser, - const gfx::Rect& relative_to, bool inspect) { + GtkWidget* anchor, bool inspect) { ExtensionProcessManager* manager = browser->profile()->GetExtensionProcessManager(); DCHECK(manager); @@ -140,7 +140,7 @@ void ExtensionPopupGtk::Show(const GURL& url, Browser* browser, ExtensionHost* host = manager->CreatePopup(url, browser); // This object will delete itself when the info bubble is closed. - new ExtensionPopupGtk(browser, host, relative_to, inspect); + new ExtensionPopupGtk(browser, host, anchor, inspect); } gfx::Rect ExtensionPopupGtk::GetViewBounds() { |