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

Unified Diff: chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm

Issue 10828364: Don't show the button for hidden page/browser actions or script badges. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/location_bar/page_action_decoration.mm
===================================================================
--- chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm (revision 152076)
+++ chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm (working copy)
@@ -286,7 +286,9 @@
if (extension_id != page_action_->extension_id())
break;
NSRect frame = owner_->GetPageActionFrame(page_action_);
- ActivatePageAction(frame);
+ // |frame| can be empty if the page action is hidden.
+ if (!NSIsEmptyRect(frame))
+ ActivatePageAction(frame);
break;
}

Powered by Google App Engine
This is Rietveld 408576698