| Index: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
|
| index 4e91304d984bd5a5db803745d28ff5f043b782cd..60ed4dd2586272d4d5f67b726fc5e409d27c38df 100644
|
| --- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
|
| @@ -246,6 +246,10 @@ class ExtensionServiceObserverBridge
|
|
|
| void ToolbarVisibleCountChanged() override {}
|
|
|
| + void ToolbarReorderNecessary(content::WebContents* web_contents) override {
|
| + // TODO(devlin): Implement on mac.
|
| + }
|
| +
|
| void ToolbarHighlightModeChanged(bool is_highlighting) override {}
|
|
|
| Browser* GetBrowser() override { return browser_; }
|
| @@ -353,9 +357,7 @@ class ExtensionServiceObserverBridge
|
| }
|
|
|
| - (void)resizeContainerAndAnimate:(BOOL)animate {
|
| - int iconCount = toolbarModel_->GetVisibleIconCount();
|
| - if (iconCount < 0) // If no buttons are hidden.
|
| - iconCount = [self buttonCount];
|
| + int iconCount = toolbarModel_->GetAbsoluteVisibleIconCount();
|
|
|
| [containerView_ resizeToWidth:[self containerWidthWithButtonCount:iconCount]
|
| animate:animate];
|
| @@ -384,9 +386,8 @@ class ExtensionServiceObserverBridge
|
| if (!toolbarModel_)
|
| return 0;
|
|
|
| - int savedButtonCount = toolbarModel_->GetVisibleIconCount();
|
| - if (savedButtonCount < 0 || // all icons are visible
|
| - static_cast<NSUInteger>(savedButtonCount) > [self buttonCount])
|
| + int savedButtonCount = toolbarModel_->GetAbsoluteVisibleIconCount();
|
| + if (static_cast<NSUInteger>(savedButtonCount) > [self buttonCount])
|
| savedButtonCount = [self buttonCount];
|
| return [self containerWidthWithButtonCount:savedButtonCount];
|
| }
|
|
|