| Index: chrome/browser/cocoa/tab_strip_controller.mm
|
| diff --git a/chrome/browser/cocoa/tab_strip_controller.mm b/chrome/browser/cocoa/tab_strip_controller.mm
|
| index 2f10f27e9c06d0dee03d346d3a807170a6a4c330..5cd69cf06fb7f0ea4fc8949878b3b567a7a6e87e 100644
|
| --- a/chrome/browser/cocoa/tab_strip_controller.mm
|
| +++ b/chrome/browser/cocoa/tab_strip_controller.mm
|
| @@ -194,6 +194,10 @@ static const float kIndentLeavingSpaceForControls = 64.0;
|
|
|
| // 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).
|
| + // TODO(viettrungluu@gmail.com): Directly iterating over the |TabContents|'s
|
| + // (essentially internal, private) list isn't great -- I'd like to get rid of
|
| + // this and somehow move it into |TabContents| itself (or provide a cleaner
|
| + // interface).
|
| TabContents* newTab = tabModel_->GetTabContentsAt(index);
|
| DCHECK(newTab);
|
| if (newTab) {
|
| @@ -959,7 +963,17 @@ static const float kIndentLeavingSpaceForControls = 64.0;
|
| // to pass it to the sheet controller here.
|
| NSView* tabContentsView =
|
| [[window->owner()->GetNativeView() superview] superview];
|
| - window->delegate()->RunSheet([self sheetController], tabContentsView);
|
| + SEL frameSelector = nil;
|
| + SEL positionSelector = nil;
|
| + if (window->delegate()->GetModalityLevel() >=
|
| + ConstrainedWindow::kModalForTab) {
|
| + frameSelector = @selector(frameWithBars);
|
| + positionSelector = @selector(positionSheetBelowToolbar:usingRect:);
|
| + }
|
| + window->delegate()->RunSheet([self sheetController],
|
| + tabContentsView,
|
| + frameSelector,
|
| + positionSelector);
|
|
|
| // TODO(avi, thakis): GTMWindowSheetController has no api to move tabsheets
|
| // between windows. Until then, we have to prevent having to move a tabsheet
|
|
|