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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 451
452 - (void)dealloc { 452 - (void)dealloc {
453 browser_->tab_strip_model()->CloseAllTabs(); 453 browser_->tab_strip_model()->CloseAllTabs();
454 454
455 // Explicitly release |presentationModeController_| here, as it may call back 455 // Explicitly release |presentationModeController_| here, as it may call back
456 // to this BWC in |-dealloc|. We are required to call |-exitPresentationMode| 456 // to this BWC in |-dealloc|. We are required to call |-exitPresentationMode|
457 // before releasing the controller. 457 // before releasing the controller.
458 [presentationModeController_ exitPresentationMode]; 458 [presentationModeController_ exitPresentationMode];
459 presentationModeController_.reset(); 459 presentationModeController_.reset();
460 460
461 // Explicitly release |fullscreenTransition_| here since it may call back to
462 // this BWC in |-dealloc|. Reset the fullscreen variables.
463 if (fullscreenTransition_) {
464 [self resetCustomAppKitFullscreenVariables];
465 fullscreenTransition_.reset();
Robert Sesek 2016/04/01 20:04:05 resetCustomAppKitFullscreenVariables does this too
spqchan 2016/04/04 16:36:16 That's a good point, I removed all the animations
466 }
467
461 // Under certain testing configurations we may not actually own the browser. 468 // Under certain testing configurations we may not actually own the browser.
462 if (ownsBrowser_ == NO) 469 if (ownsBrowser_ == NO)
463 ignore_result(browser_.release()); 470 ignore_result(browser_.release());
464 471
465 [[NSNotificationCenter defaultCenter] removeObserver:self]; 472 [[NSNotificationCenter defaultCenter] removeObserver:self];
466 473
467 // Inform reference counted objects that the Browser will be destroyed. This 474 // Inform reference counted objects that the Browser will be destroyed. This
468 // ensures they invalidate their weak Browser* to prevent use-after-free. 475 // ensures they invalidate their weak Browser* to prevent use-after-free.
469 // These may outlive the Browser if they are retained by something else. For 476 // These may outlive the Browser if they are retained by something else. For
470 // example, since 10.10, the Nib loader internally creates an NSDictionary 477 // example, since 10.10, the Nib loader internally creates an NSDictionary
(...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 2115
2109 - (BOOL)isTabbedWindow { 2116 - (BOOL)isTabbedWindow {
2110 return browser_->is_type_tabbed(); 2117 return browser_->is_type_tabbed();
2111 } 2118 }
2112 2119
2113 - (NSRect)savedRegularWindowFrame { 2120 - (NSRect)savedRegularWindowFrame {
2114 return savedRegularWindowFrame_; 2121 return savedRegularWindowFrame_;
2115 } 2122 }
2116 2123
2117 @end // @implementation BrowserWindowController(WindowType) 2124 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698