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

Unified Diff: chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm

Issue 1850313002: Fix Fullscreen Animation Crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_fullscreen_transition.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm b/chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm
index 1a0792aa5cf9039d0eb00a55237b2e63a9298653..8febfb523355e1ed25866c3f454bd5c934518738 100644
--- a/chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm
+++ b/chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm
@@ -164,7 +164,7 @@ class FrameAndStyleLock {
- (void)changePrimaryWindowToFinalFrame;
// Override of CAAnimation delegate method.
-- (void)animationDidStop:(CAAnimation*)theAnimation finished:(BOOL)flag;
+- (void)animationDidStop:(CAAnimation*)theAnimation finished:(BOOL)finished;
// Returns the layer of the root view of |window|.
- (CALayer*)rootLayerOfWindow:(NSWindow*)window;
@@ -254,6 +254,14 @@ class FrameAndStyleLock {
: [[primaryWindow_ contentView] bounds].size;
}
+- (void)browserWillBeDestroyed {
+ CALayer* root = [self rootLayerOfWindow:primaryWindow_];
+ [root removeAllAnimations];
+ [snapshotLayer_ removeAllAnimations];
+
+ controller_ = nil;
+}
+
// -------------------------Private Methods----------------------------
- (void)takeSnapshot {
@@ -473,7 +481,7 @@ class FrameAndStyleLock {
changingPrimaryWindowSize_ = NO;
}
-- (void)animationDidStop:(CAAnimation*)theAnimation finished:(BOOL)flag {
+- (void)animationDidStop:(CAAnimation*)theAnimation finished:(BOOL)finished {
NSString* animationID = [theAnimation valueForKey:kAnimationIDKey];
// Remove the snapshot window.
@@ -524,11 +532,11 @@ class FrameAndStyleLock {
[root removeAnimationForKey:kPrimaryWindowAnimationID];
root.opacity = 1;
+ completedTransition_ = YES;
+
if (!isEnteringFullscreen_)
[controller_ exitFullscreenAnimationFinished];
}
-
- completedTransition_ = YES;
}
- (CALayer*)rootLayerOfWindow:(NSWindow*)window {
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_fullscreen_transition.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698