Index: chrome/browser/ui/cocoa/browser_window_controller_private.mm |
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm |
index f701c6f5b01ea213a58610072945baa6207af24e..e1b7885bd2a795e90f310c1899a97478ede4af75 100644 |
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm |
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm |
@@ -566,10 +566,13 @@ |
[tabStripView removeFromSuperview]; |
} |
+ // Ditto for the content view. |
+ base::scoped_nsobject<NSView> contentView( |
+ [[sourceWindow contentView] retain]); |
// Disable autoresizing of subviews while we move views around. This prevents |
// spurious renderer resizes. |
- [self.chromeContentView setAutoresizesSubviews:NO]; |
- [self.chromeContentView removeFromSuperview]; |
+ [contentView setAutoresizesSubviews:NO]; |
+ [contentView removeFromSuperview]; |
// Have to do this here, otherwise later calls can crash because the window |
// has no delegate. |
@@ -581,11 +584,8 @@ |
// drawOverlayRect:]. I'm pretty convinced this is an Apple bug, but there is |
// no visual impact. I have been unable to tickle it away with other window |
// or view manipulation Cocoa calls. Stack added to suppressions_mac.txt. |
- [self.chromeContentView setAutoresizesSubviews:YES]; |
- [[destWindow contentView] addSubview:self.chromeContentView |
- positioned:NSWindowBelow |
- relativeTo:nil]; |
- self.chromeContentView.frame = [[destWindow contentView] bounds]; |
+ [contentView setAutoresizesSubviews:YES]; |
+ [destWindow setContentView:contentView]; |
// Move the incognito badge if present. |
if ([self shouldShowAvatar]) { |
@@ -852,7 +852,7 @@ |
for (NSWindow* window in [[NSApplication sharedApplication] windows]) { |
if ([window |
isKindOfClass:NSClassFromString(@"NSToolbarFullScreenWindow")]) { |
- [[window contentView] setHidden:YES]; |
+ [window.contentView setHidden:YES]; |
} |
} |
} |
@@ -930,7 +930,7 @@ |
} |
- (void)updateSubviewZOrder:(BOOL)inPresentationMode { |
- NSView* contentView = self.chromeContentView; |
+ NSView* contentView = [[self window] contentView]; |
NSView* toolbarView = [toolbarController_ view]; |
if (inPresentationMode) { |