Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm

Issue 7809013: Remove Animation When "Resuming" Window in Lion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clear flag at session_restore level. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
index 1a92665d0bc26cebc3141010be147c47ec5b5c6d..6e0e95aa38d8d3faf497f4b244b6f503c8763336 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
@@ -265,10 +265,12 @@ const NSTimeInterval kTearDuration = 0.333;
// Disable window animation before calling |orderFront:| when detatching
// to a new window.
NSWindowAnimationBehavior savedAnimationBehavior = 0;
Mark Mentovai 2011/08/31 18:47:01 Get rid of the initializer like you did in the oth
dhollowa 2011/08/31 18:57:17 Done.
+ bool didSaveAnimationBehavior = false;
if ([dragWindow_ respondsToSelector:@selector(animationBehavior)] &&
[dragWindow_ respondsToSelector:@selector(setAnimationBehavior:)]) {
savedAnimationBehavior = [dragWindow_ animationBehavior];
[dragWindow_ setAnimationBehavior:NSWindowAnimationBehaviorNone];
+ didSaveAnimationBehavior = true;
Mark Mentovai 2011/08/31 18:47:01 Move this one up like you did in the other file.
dhollowa 2011/08/31 18:57:17 Done.
}
// If dragging the tab only moves the current window, do not show overlay
@@ -285,11 +287,9 @@ const NSTimeInterval kTearDuration = 0.333;
tearTime_ = [NSDate timeIntervalSinceReferenceDate];
tearOrigin_ = sourceWindowFrame_.origin;
- // Restore window animation behavior
- if ([dragWindow_ respondsToSelector:@selector(animationBehavior)] &&
- [dragWindow_ respondsToSelector:@selector(setAnimationBehavior:)]) {
+ // Restore window animation behavior.
+ if (didSaveAnimationBehavior)
[dragWindow_ setAnimationBehavior:savedAnimationBehavior];
- }
}
// TODO(pinkerton): http://crbug.com/25682 demonstrates a way to get here by
« chrome/browser/ui/browser.h ('K') | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698