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

Unified Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

Issue 1061623002: [Toolbar Mac UI] Simplify and correct omnibox pinning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
index ea9f76d8a869d4f986512938cf399fc9daa9b0ae..12feb683f90301b2cddbb84137f1387628ad4eb7 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
@@ -654,10 +654,8 @@ class NotificationBridge : public WrenchMenuBadgeController::Delegate {
name:NSWindowDidBecomeKeyNotification
object:[[self view] window]];
}
- CGFloat containerWidth = [browserActionsContainerView_ isHidden] ? 0.0 :
- NSWidth([browserActionsContainerView_ frame]);
- if (containerWidth > 0.0)
- [self adjustLocationSizeBy:(containerWidth * -1) animate:NO];
+ if (![browserActionsContainerView_ isHidden])
+ [self pinLocationBarToLeftOfBrowserActionsContainerAndAnimate:NO];
}
- (void)adjustBrowserActionsContainerForNewWindow:
@@ -670,10 +668,7 @@ class NotificationBridge : public WrenchMenuBadgeController::Delegate {
}
- (void)browserActionsContainerDragged:(NSNotification*)notification {
- CGFloat locationBarWidth = NSWidth([locationBar_ frame]);
- locationBarAtMinSize_ = locationBarWidth <= kMinimumLocationBarWidth;
- [self adjustLocationSizeBy:
- [browserActionsContainerView_ resizeDeltaX] animate:NO];
+ [self pinLocationBarToLeftOfBrowserActionsContainerAndAnimate:NO];
}
- (void)browserActionsVisibilityChanged:(NSNotification*)notification {
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698