summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/extensions/browser_actions_controller.mm
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/cocoa/extensions/browser_actions_controller.mm')
-rw-r--r--chrome/browser/cocoa/extensions/browser_actions_controller.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/cocoa/extensions/browser_actions_controller.mm
index 26a7ca6..fda32b6 100644
--- a/chrome/browser/cocoa/extensions/browser_actions_controller.mm
+++ b/chrome/browser/cocoa/extensions/browser_actions_controller.mm
@@ -210,6 +210,15 @@ class ExtensionsServiceObserverBridge : public NotificationObserver {
return [buttons_ count];
}
+- (int)visibleButtonCount {
+ int count = 0;
+ for (BrowserActionButton* button in [buttons_ allValues]) {
+ if (![button isHidden])
+ ++count;
+ }
+ return count;
+}
+
- (void)browserActionClicked:(BrowserActionButton*)sender {
ExtensionAction* action = [sender extension]->browser_action();
if (action->has_popup() && !popupController_) {