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

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_action_button.mm

Issue 2857653002: Fix BrowserActionsBarBrowserTest.OverflowedBrowserActionPopupTestRemoval in ASan with new libc++. (Closed)
Patch Set: worse! Created 3 years, 8 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
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

Powered by Google App Engine
This is Rietveld 408576698