From 3e2bfcf0ae9e0e81c091294460fdbeaef51f47ad Mon Sep 17 00:00:00 2001 From: "pinkerton@chromium.org" Date: Thu, 30 Jul 2009 20:45:10 +0000 Subject: Fix tab dragging to always hide the new tab button while dragging a tab or targeting an existing window. Makes things much nicer. BUG=14923, 14925, 15667 TEST=dragging tabs in and out of windows, and within windows. Make sure new tab button goes away when it should and always comes back. Review URL: http://codereview.chromium.org/160345 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22092 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/tab_strip_controller.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'chrome/browser/cocoa/tab_strip_controller.h') diff --git a/chrome/browser/cocoa/tab_strip_controller.h b/chrome/browser/cocoa/tab_strip_controller.h index 46924ef..68c7ce4 100644 --- a/chrome/browser/cocoa/tab_strip_controller.h +++ b/chrome/browser/cocoa/tab_strip_controller.h @@ -57,6 +57,8 @@ class ToolbarModel; // aren't coalesced, so we store frames to avoid redundant calls. scoped_nsobject targetFrames_; NSRect newTabTargetFrame_; + // If YES, do not show the new tab button during layout. + BOOL forceNewTabButtonHidden_; // Width available for resizing the tabs (doesn't include the new tab // button). Used to restrict the available width when closing many tabs at @@ -107,6 +109,10 @@ class ToolbarModel; frame:(NSRect)frame yStretchiness:(CGFloat)yStretchiness; +// Show or hide the new tab button. The button is hidden immediately, but +// waits until the next call to |-layoutTabs| to show it again. +- (void)showNewTabButton:(BOOL)show; + // Force the tabs to rearrange themselves to reflect the current model. - (void)layoutTabs; -- cgit v1.1