| Index: chrome/browser/cocoa/tab_strip_controller.mm
|
| ===================================================================
|
| --- chrome/browser/cocoa/tab_strip_controller.mm (revision 65756)
|
| +++ chrome/browser/cocoa/tab_strip_controller.mm (working copy)
|
| @@ -469,7 +469,7 @@
|
| // New content is in place, delegate should adjust itself accordingly.
|
| [delegate_ onSelectTabWithContents:[controller tabContents]];
|
|
|
| - // It also resores content autoresizing properties.
|
| + // It also restores content autoresizing properties.
|
| [controller ensureContentsVisible];
|
|
|
| // Make sure the new tabs's sheets are visible (necessary when a background
|
| @@ -973,7 +973,7 @@
|
| // Make a new tab. Load the contents of this tab from the nib and associate
|
| // the new controller with |contents| so it can be looked up later.
|
| scoped_nsobject<TabContentsController> contentsController(
|
| - [[TabContentsController alloc] initWithContents:contents]);
|
| + [[TabContentsController alloc] initWithContents:contents delegate:self]);
|
| [tabContentsArray_ insertObject:contentsController atIndex:index];
|
|
|
| // Make a new tab and add it to the strip. Keep track of its controller.
|
| @@ -1080,7 +1080,8 @@
|
| // into the array, replacing |oldContents|. A TabSelectedAt notification will
|
| // follow, at which point we will install the new view.
|
| scoped_nsobject<TabContentsController> newController(
|
| - [[TabContentsController alloc] initWithContents:newContents]);
|
| + [[TabContentsController alloc] initWithContents:newContents
|
| + delegate:self]);
|
|
|
| // Bye bye, |oldController|.
|
| [tabContentsArray_ replaceObjectAtIndex:index withObject:newController];
|
| @@ -1787,6 +1788,14 @@
|
| sheetController_.reset();
|
| }
|
|
|
| +// TabContentsControllerDelegate protocol.
|
| +- (void)tabContentsViewFrameWillChange:(TabContentsController*)source
|
| + frameRect:(NSRect)frameRect {
|
| + id<TabContentsControllerDelegate> controller =
|
| + [[switchView_ window] windowController];
|
| + [controller tabContentsViewFrameWillChange:source frameRect:frameRect];
|
| +}
|
| +
|
| - (TabContentsController*)activeTabContentsController {
|
| int modelIndex = tabStripModel_->selected_index();
|
| if (modelIndex < 0)
|
|
|