diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 18:05:31 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 18:05:31 +0000 |
commit | 8538894e63ccd5239049484737fb4b819fe49bad (patch) | |
tree | 96a646bffcdfa4b3d6ce2c43a30655bf81f798f2 /chrome/browser/cocoa/tab_strip_controller.h | |
parent | 2e63183c36ee22e7c3c470cfcf49c9266016dc21 (diff) | |
download | chromium_src-8538894e63ccd5239049484737fb4b819fe49bad.zip chromium_src-8538894e63ccd5239049484737fb4b819fe49bad.tar.gz chromium_src-8538894e63ccd5239049484737fb4b819fe49bad.tar.bz2 |
Fix a lot of jankiness during tab dragging. Fix dragging last tab in a different way (overlay view) so we can continue to use the "sprouting up" new tab animation. Improved animation with placeholder so it's smoother. Fixed jank closing and tearing off windows by suppressing window updates. Patch from alcor@google.com
BUG=none
TEST=tab dragging w/in a window, between windows. Creating new tabs. Closing window with lots of tabs.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_strip_controller.h')
-rw-r--r-- | chrome/browser/cocoa/tab_strip_controller.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/tab_strip_controller.h b/chrome/browser/cocoa/tab_strip_controller.h index 35fbc42..eeab6b0 100644 --- a/chrome/browser/cocoa/tab_strip_controller.h +++ b/chrome/browser/cocoa/tab_strip_controller.h @@ -35,6 +35,7 @@ class ToolbarModel; TabContents* currentTab_; // weak, tab for which we're showing state TabStripView* tabView_; // weak NSView* switchView_; // weak + scoped_nsobject<NSView> dragBlockingView_; // avoid bad window server drags NSButton* newTabButton_; // weak, obtained from the nib. scoped_ptr<TabStripModelObserverBridge> bridge_; TabStripModel* tabModel_; // weak @@ -47,10 +48,15 @@ class ToolbarModel; // this is kept in the same order as the tab strip model. scoped_nsobject<NSMutableArray> tabArray_; - // These values are only used during a drag, and override tab positioning + // These values are only used during a drag, and override tab positioning. TabView* placeholderTab_; // weak. Tab being dragged NSRect placeholderFrame_; // Frame to use - CGFloat placeholderStretchiness_; // Vertical force indicated by streching tab + CGFloat placeholderStretchiness_; // Vertical force shown by streching tab. + // Frame targets for all the current views. + // target frames are used because repeated requests to [NSView animator]. + // aren't coalesced, so we store frames to avoid redundant calls. + scoped_nsobject<NSMutableDictionary> targetFrames_; + NSRect newTabTargetFrame_; } // Initialize the controller with a view and browser that contains @@ -69,6 +75,9 @@ class ToolbarModel; // Return the view for the currently selected tab. - (NSView *)selectedTabView; +// Set the frame of the selected tab, also updates the internal frame dict. +- (void)setFrameOfSelectedTab:(NSRect)frame; + // Move the given tab at index |from| in this window to the location of the // current placeholder. - (void)moveTabFromIndex:(NSInteger)from; |