Index: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
=================================================================== |
--- chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm (revision 74134) |
+++ chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm (working copy) |
@@ -471,16 +471,17 @@ |
[switchView_ addSubview:newView]; |
} |
+ TabContentsWrapper* newTab = tabStripModel_->GetTabContentsAt(modelIndex); |
+ DCHECK(newTab); |
+ |
// New content is in place, delegate should adjust itself accordingly. |
- [delegate_ onSelectTabWithContents:[controller tabContents]]; |
+ [delegate_ onSelectTab:newTab]; |
// It also restores content autoresizing properties. |
[controller ensureContentsVisible]; |
// Make sure the new tabs's sheets are visible (necessary when a background |
// tab opened a sheet while it was in the background and now becomes active). |
- TabContentsWrapper* newTab = tabStripModel_->GetTabContentsAt(modelIndex); |
- DCHECK(newTab); |
if (newTab) { |
TabContents::ConstrainedWindowList::iterator it, end; |
end = newTab->tab_contents()->constrained_window_end(); |