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

Unified Diff: chrome/browser/cocoa/previewable_contents_controller.mm

Issue 3624001: Implement Instant on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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/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]];
« no previous file with comments | « chrome/browser/cocoa/location_bar/location_bar_view_mac.mm ('k') | chrome/browser/tab_contents/tab_contents_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698