Index: chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc |
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc |
index 34f300ac07e04720260efa3d538186ec84698fb7..1c6575f266afebec54c2ce3d7e4714cd9f3ae6a0 100644 |
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc |
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc |
@@ -24,6 +24,7 @@ |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/sessions/session_tab_helper.h" |
#include "chrome/browser/ui/browser.h" |
+#include "chrome/browser/ui/browser_list.h" |
#include "chrome/browser/ui/gtk/browser_window_gtk.h" |
#include "chrome/browser/ui/gtk/custom_button.h" |
#include "chrome/browser/ui/gtk/extensions/extension_popup_gtk.h" |
@@ -768,6 +769,22 @@ void BrowserActionsToolbarGtk::BrowserActionMoved(const Extension* extension, |
gtk_box_reorder_child(GTK_BOX(button_hbox_.get()), button_widget, index); |
} |
+void BrowserActionsToolbarGtk::BrowserActionShowPopup( |
+ const Extension* extension) { |
+ // Do not override other popups and only show in active window. |
+ if (ExtensionPopupGtk::get_current_extension_popup() != NULL || |
mark a. foltz
2013/10/11 20:25:30
Does the toolbar model know if there is an active
justinlin
2013/10/16 07:06:48
No, the model doesn't know anything about whether
|
+ BrowserList::GetInstance(chrome::GetActiveDesktop())->GetLastActive() != |
+ browser()) { |
+ return; |
+ } |
+ |
+ GURL popupUrl = model_->GetPopupUrl(extension, browser()); |
+ if (!popupUrl.is_empty()) { |
+ ExtensionPopupGtk::Show(popup_url, browser(), button->widget(), |
+ ExtensionPopupGtk::SHOW); |
+ } |
+} |
+ |
void BrowserActionsToolbarGtk::ModelLoaded() { |
SetContainerWidth(); |
} |