summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/tab_strip_controller.mm
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/cocoa/tab_strip_controller.mm')
-rw-r--r--chrome/browser/cocoa/tab_strip_controller.mm15
1 files changed, 12 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/tab_strip_controller.mm b/chrome/browser/cocoa/tab_strip_controller.mm
index 896dadf..3ccdf3f 100644
--- a/chrome/browser/cocoa/tab_strip_controller.mm
+++ b/chrome/browser/cocoa/tab_strip_controller.mm
@@ -469,7 +469,7 @@ private:
// 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 @@ private:
// 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 @@ private:
// 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 @@ private:
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)