Chromium Code Reviews| Index: chrome/browser/ui/views/browser_actions_container.cc |
| diff --git a/chrome/browser/ui/views/browser_actions_container.cc b/chrome/browser/ui/views/browser_actions_container.cc |
| index 850189762babaf027940beb6b62b50d63e4e86c2..91d7747252bad55f563ce8b242caac872b97eb4e 100644 |
| --- a/chrome/browser/ui/views/browser_actions_container.cc |
| +++ b/chrome/browser/ui/views/browser_actions_container.cc |
| @@ -686,6 +686,20 @@ void BrowserActionsContainer::BrowserActionMoved(const Extension* extension, |
| SchedulePaint(); |
| } |
| +void BrowserActionsContainer::BrowserActionShowPopup( |
| + const extensions::Extension* extension) { |
| + // DO_NOT_REVIEW: This is not completely correct yet. |
|
Finnur
2013/10/15 10:44:21
Can you elaborate?
justinlin
2013/10/16 07:06:48
This is done now.
|
| + BrowserActionButton* button = NULL; |
| + for (BrowserActionViews::iterator it = browser_action_views_.begin(); |
| + it != browser_action_views_.end(); ++it) { |
| + if ((*it)->button()->extension() == extension) { |
| + button = (*it)->button(); |
| + } |
| + } |
| + if (button != NULL) |
| + ShowPopup(button, ExtensionPopup::SHOW); |
| +} |
| + |
| void BrowserActionsContainer::ModelLoaded() { |
| SetContainerWidth(); |
| } |
| @@ -815,7 +829,7 @@ bool BrowserActionsContainer::ShouldDisplayBrowserAction( |
| void BrowserActionsContainer::ShowPopup( |
| BrowserActionButton* button, |
| ExtensionPopup::ShowAction show_action) { |
| - const Extension* extension = button->extension(); |
| + const extensions::Extension* extension = button->extension(); |
| GURL popup_url; |
| if (model_->ExecuteBrowserAction(extension, browser_, &popup_url) != |
| ExtensionToolbarModel::ACTION_SHOW_POPUP) { |