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..76a374c07de9c44b375d21fddbdd4e41f57e1497 100644 |
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm |
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm |
@@ -119,6 +119,10 @@ const CGFloat kBrowserActionBubbleYOffset = 3.0; |
// toolbar know that the drag has finished. |
- (void)containerDragFinished:(NSNotification*)notification; |
+// Sends a notification for the toolbar to determine whether the container can |
+// translate with a delta on x-axis. |
+- (void)containerWillTranslateOnX:(NSNotification*)notification; |
+ |
// Adjusts the position of the surrounding action buttons depending on where the |
// button is within the container. |
- (void)actionButtonDragging:(NSNotification*)notification; |
@@ -305,6 +309,11 @@ class ExtensionServiceObserverBridge |
selector:@selector(containerDragFinished:) |
name:kBrowserActionGrippyDragFinishedNotification |
object:containerView_]; |
+ [[NSNotificationCenter defaultCenter] |
+ addObserver:self |
+ selector:@selector(containerWillTranslateOnX:) |
+ name:kBrowserActionGrippyWillDragNotification |
+ object:containerView_]; |
// Listen for a finished drag from any button to make sure each open window |
// stays in sync. |
[[NSNotificationCenter defaultCenter] |
@@ -670,6 +679,13 @@ class ExtensionServiceObserverBridge |
object:self]; |
} |
+- (void)containerWillTranslateOnX:(NSNotification*)notification { |
+ [[NSNotificationCenter defaultCenter] |
+ postNotificationName:kBrowserActionGrippyWillDragNotification |
+ object:self |
+ userInfo:notification.userInfo]; |
+} |
+ |
- (void)actionButtonDragging:(NSNotification*)notification { |
if (![self chevronIsHidden]) |
[self setChevronHidden:YES inFrame:[containerView_ frame] animate:YES]; |