Index: chrome/browser/cocoa/previewable_contents_controller.mm |
=================================================================== |
--- chrome/browser/cocoa/previewable_contents_controller.mm (revision 62138) |
+++ chrome/browser/cocoa/previewable_contents_controller.mm (working copy) |
@@ -27,8 +27,12 @@ |
- (void)showPreview:(TabContents*)preview { |
DCHECK(preview); |
+ |
+ // Remove any old preview contents before showing the new one. |
+ if (previewContents_) |
+ [previewContents_->GetNativeView() removeFromSuperview]; |
+ |
previewContents_ = preview; |
- |
NSView* previewView = previewContents_->GetNativeView(); |
[previewView setFrame:[[self view] bounds]]; |