diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 19:59:26 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 19:59:26 +0000 |
commit | 44fc30fc16c738daaef3bef331ff7a1e5b5b1b05 (patch) | |
tree | 62a9ba51ec422e9bd8cafd9de13310835a1a3bae /chrome/browser/cocoa/tab_strip_controller.mm | |
parent | ced52850257336648fd357ea294519f5a9f351dd (diff) | |
download | chromium_src-44fc30fc16c738daaef3bef331ff7a1e5b5b1b05.zip chromium_src-44fc30fc16c738daaef3bef331ff7a1e5b5b1b05.tar.gz chromium_src-44fc30fc16c738daaef3bef331ff7a1e5b5b1b05.tar.bz2 |
Add support for slowing down all animations on the Mac by using the shift and/or
control key.
BUG=27274
TEST= 1) create a window.
2) Create a tab.
3) Hold down the shift key and click in the close button on the tab.
4) Watch animation proceed slowly. (and slower if you hold down shift + control)
This should apply to all non-web page animations.
Review URL: http://codereview.chromium.org/388004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31588 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_strip_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/tab_strip_controller.mm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/tab_strip_controller.mm b/chrome/browser/cocoa/tab_strip_controller.mm index dcc25ea..72f3324 100644 --- a/chrome/browser/cocoa/tab_strip_controller.mm +++ b/chrome/browser/cocoa/tab_strip_controller.mm @@ -36,6 +36,7 @@ #include "grit/generated_resources.h" #include "grit/theme_resources.h" #include "skia/ext/skia_utils_mac.h" +#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" NSString* const kTabStripNumberOfTabsChanged = @"kTabStripNumberOfTabsChanged"; @@ -546,7 +547,7 @@ static const NSTimeInterval kAnimationDuration = 0.2; NSRect enclosingRect = NSZeroRect; [NSAnimationContext beginGrouping]; - [[NSAnimationContext currentContext] setDuration:kAnimationDuration]; + [[NSAnimationContext currentContext] gtm_setDuration:kAnimationDuration]; // Update the current subviews and their z-order if requested. if (doUpdate) @@ -912,7 +913,7 @@ static const NSTimeInterval kAnimationDuration = 0.2; NSRect newFrame = [tabView frame]; newFrame = NSOffsetRect(newFrame, 0, -newFrame.size.height); [NSAnimationContext beginGrouping]; - [[NSAnimationContext currentContext] setDuration:kAnimationDuration]; + [[NSAnimationContext currentContext] gtm_setDuration:kAnimationDuration]; [[tabView animator] setFrame:newFrame]; [NSAnimationContext endGrouping]; } |