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

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

Issue 459008: Mac: the return of the tab-modal-sheets patch. (Closed)
Patch Set: Merged ToT. Must ... commit ... soon. Created 11 years 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
« no previous file with comments | « chrome/browser/cocoa/shell_dialogs_mac.mm ('k') | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a468b31d5d1a3175df0839033bdb0abb9788e7c2..978d759562c47fb3d17932f9489d4bc0e9b73557 100644
--- a/chrome/browser/cocoa/tab_strip_controller.mm
+++ b/chrome/browser/cocoa/tab_strip_controller.mm
@@ -386,6 +386,10 @@ private:
// 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): 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 = tabStripModel_->GetTabContentsAt(modelIndex);
DCHECK(newTab);
if (newTab) {
@@ -1633,7 +1637,21 @@ private:
if (constrainedWindows_[tab].size() == 1) {
[controller setTab:tab isDraggable:NO];
window->SetVisible();
- window->delegate()->RunSheet([self sheetController], tabContentsView);
+
+ SEL frameSelector = nil;
+ SEL positionSelector = nil;
+// TODO(viettrungluu): I need to provide appropriate selectors and stuff.
+#if 0
+ if (window->delegate()->GetModalityLevel() >=
+ ConstrainedWindow::kModalForTab) {
+ frameSelector = @selector(frameWithBars);
+ positionSelector = @selector(positionSheetBelowToolbar:usingRect:);
+ }
+#endif
+ window->delegate()->RunSheet([self sheetController],
+ tabContentsView,
+ frameSelector,
+ positionSelector);
return YES;
}
}
« no previous file with comments | « chrome/browser/cocoa/shell_dialogs_mac.mm ('k') | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698