Index: chrome/browser/ui/cocoa/extensions/browser_action_button.mm |
diff --git a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm |
index 18312c172ebcd6b1abbb2951942d11a82ff5a862..b36bd44fa06b6ff4bcef13a23d298424c8e1978d 100644 |
--- a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm |
+++ b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm |
@@ -60,6 +60,8 @@ class ToolbarActionViewDelegateBridge : public ToolbarActionViewDelegate { |
// Shows the context menu for the owning action. |
void ShowContextMenu(); |
+ void HidePopup(); |
+ |
bool user_shown_popup_visible() const { return user_shown_popup_visible_; } |
private: |
@@ -137,6 +139,10 @@ void ToolbarActionViewDelegateBridge::ShowContextMenu() { |
weakFactory_.GetWeakPtr())); |
} |
+void ToolbarActionViewDelegateBridge::HidePopup() { |
+ viewController_->HidePopup(); |
+} |
+ |
content::WebContents* ToolbarActionViewDelegateBridge::GetCurrentWebContents() |
const { |
return [controller_ currentWebContents]; |
@@ -479,6 +485,10 @@ void ToolbarActionViewDelegateBridge::DoShowContextMenu() { |
viewControllerDelegate_->ShowContextMenu(); |
} |
+- (void)hidePopup { |
+ viewControllerDelegate_->HidePopup(); |
+} |
+ |
- (NSMenu*)menu { |
// Hack: Since Cocoa doesn't support menus-running-in-menus (see also comment |
// in -rightMouseDown:), it doesn't launch the menu for an overflowed action |