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

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm

Issue 675023002: Make extensions that desire to act pop out if in overflow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
index d86dc90d390f060393fc3c0d529ef817bfc8d44f..96a9a71c466d99d09c242dd232305530ccfb105a 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
@@ -245,6 +245,10 @@ class ExtensionServiceObserverBridge
void ToolbarVisibleCountChanged() override {}
+ void OnToolbarReorderNecessary(content::WebContents* web_contents) override {
+ // TODO(devlin): Implement on mac.
+ }
+
void ToolbarHighlightModeChanged(bool is_highlighting) override {}
Browser* GetBrowser() override { return browser_; }
@@ -355,9 +359,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_->visible_icon_count();
[containerView_ resizeToWidth:[self containerWidthWithButtonCount:iconCount]
animate:animate];
@@ -377,9 +379,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_->visible_icon_count();
+ if (static_cast<NSUInteger>(savedButtonCount) > [self buttonCount])
savedButtonCount = [self buttonCount];
return [self containerWidthWithButtonCount:savedButtonCount];
}
« no previous file with comments | « chrome/browser/extensions/extension_toolbar_model_unittest.cc ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698