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

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_actions_controller.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/extensions/browser_actions_controller.mm
===================================================================
--- chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm (revision 152078)
+++ chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm (working copy)
@@ -213,7 +213,9 @@
if (!extension)
break;
BrowserActionButton* button = [owner_ buttonForExtension:extension];
- [owner_ browserActionClicked:button];
+ // |button| can be NULL when the browser action has its button hidden.
Scott Hess - ex-Googler 2012/08/17 17:13:17 s/NULL/nil/ for Objective-C objects. Unless Brows
+ if (button)
+ [owner_ browserActionClicked:button];
Scott Hess - ex-Googler 2012/08/17 17:13:17 This combination almost makes me wish you could wr
Finnur 2012/08/20 11:41:45 Yeah, it is a bit silly because the function actua
Finnur 2012/08/20 14:03:34 Actually, I take that back (and reverted this chan
Scott Hess - ex-Googler 2012/08/20 22:59:34 Makes sense (I think). On 2012/08/20 14:03:34, Fi
break;
}
default:

Powered by Google App Engine
This is Rietveld 408576698