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

Unified Diff: chrome/browser/ui/views/browser_dialogs_views_mac.cc

Issue 2041723002: [Mac] Dismiss an open page info dialog when the location icon is clicked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nit Created 4 years, 6 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
« no previous file with comments | « chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/browser_dialogs_views_mac.cc
diff --git a/chrome/browser/ui/views/browser_dialogs_views_mac.cc b/chrome/browser/ui/views/browser_dialogs_views_mac.cc
index f30448add01b2e69586eb22d5804f244625825ef..8c169cec1575af0b2f6e2fcf7de9636f0440d820 100644
--- a/chrome/browser/ui/views/browser_dialogs_views_mac.cc
+++ b/chrome/browser/ui/views/browser_dialogs_views_mac.cc
@@ -26,6 +26,16 @@ void ShowWebsiteSettingsBubbleViewsAtPoint(
content::WebContents* web_contents,
const GURL& virtual_url,
const security_state::SecurityStateModel::SecurityInfo& security_info) {
+ // Don't show the bubble again if it's already showing. A second click on the
+ // location icon in the omnibox will dismiss an open bubble. This behaviour is
+ // consistent with the non-Mac views implementation.
+ // Note that when the browser is toolkit-views, IsPopupShowing() is checked
+ // earlier because the popup is shown on mouse release (but dismissed on
+ // mouse pressed). A Cocoa browser does both on mouse pressed, so a check
+ // when showing is sufficient.
+ if (WebsiteSettingsPopupView::IsPopupShowing())
+ return;
+
WebsiteSettingsPopupView::ShowPopup(
nullptr, gfx::Rect(anchor_point, gfx::Size()), profile, web_contents,
virtual_url, security_info);
« no previous file with comments | « chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698