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 4163045b751496707c25d7124ec8071214c72056..5a12e441890d1fa281884bc339b7b8db5cb12ee5 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; |
@@ -314,6 +318,11 @@ class ExtensionServiceObserverBridge |
selector:@selector(containerDragFinished:) |
name:kBrowserActionGrippyDragFinishedNotification |
object:containerView_]; |
+ [[NSNotificationCenter defaultCenter] |
+ addObserver:self |
+ selector:@selector(containerWillTranslateOnX:) |
+ name:kBrowseActionContainerWillTranslateOnXNotification |
+ object:containerView_]; |
// Listen for a finished drag from any button to make sure each open window |
// stays in sync. |
[[NSNotificationCenter defaultCenter] |
@@ -677,6 +686,13 @@ class ExtensionServiceObserverBridge |
object:self]; |
} |
+- (void)containerWillTranslateOnX:(NSNotification*)notification { |
+ [[NSNotificationCenter defaultCenter] |
+ postNotificationName:kBrowseActionContainerWillTranslateOnXNotification |
+ object:self |
+ userInfo:notification.userInfo]; |
+} |
+ |
- (void)actionButtonDragging:(NSNotification*)notification { |
if (![self chevronIsHidden]) |
[self setChevronHidden:YES inFrame:[containerView_ frame] animate:YES]; |