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

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_actions_container_view.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
Index: chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm
index d5338ae104002e17c74bbdeeba14882bdb28d35b..ecd68752398300c86fdc5f14fdc5650bf067c349 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm
@@ -120,7 +120,6 @@ const CGFloat kMinimumContainerWidth = 3.0;
!NSMouseInRect(initialDragPoint_, grippyRect_, [self isFlipped]))
return;
- lastXPos_ = [self frame].origin.x;
userIsResizing_ = YES;
[[self appropriateCursorForGrippy] push];
@@ -180,8 +179,6 @@ const CGFloat kMinimumContainerWidth = 3.0;
[[NSNotificationCenter defaultCenter]
postNotificationName:kBrowserActionGrippyDraggingNotification
object:self];
-
- lastXPos_ += dX;
}
- (ViewID)viewID {
@@ -198,7 +195,6 @@ const CGFloat kMinimumContainerWidth = 3.0;
CGFloat maxAllowedWidth = [self maxAllowedWidth];
width = std::min(maxAllowedWidth, width);
- lastXPos_ = frame.origin.x;
CGFloat dX = frame.size.width - width;
frame.size.width = width;
NSRect newFrame = NSOffsetRect(frame, dX, 0);
@@ -225,10 +221,6 @@ const CGFloat kMinimumContainerWidth = 3.0;
}
}
-- (CGFloat)resizeDeltaX {
- return [self frame].origin.x - lastXPos_;
-}
-
- (NSRect)animationEndFrame {
if ([resizeAnimation_ isAnimating]) {
NSRect endFrame = [[[[resizeAnimation_ viewAnimations] objectAtIndex:0]

Powered by Google App Engine
This is Rietveld 408576698