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

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

Issue 384113: Mac: Only show one per-tab sheet at a time per tab. (Closed)
Patch Set: comments Created 11 years, 1 month 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/constrained_window_mac.mm ('k') | chrome/browser/cocoa/tab_strip_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/tab_strip_controller.h
diff --git a/chrome/browser/cocoa/tab_strip_controller.h b/chrome/browser/cocoa/tab_strip_controller.h
index 0ee2fc462cc9518b1161dffdf7a4f3a93f5dafab..fae7831621a7b17261960dbce3ced934e5d9c83e 100644
--- a/chrome/browser/cocoa/tab_strip_controller.h
+++ b/chrome/browser/cocoa/tab_strip_controller.h
@@ -7,6 +7,9 @@
#import <Cocoa/Cocoa.h>
+#include <deque>
+#include <map>
+
#include "base/scoped_nsobject.h"
#include "base/scoped_ptr.h"
#import "chrome/browser/cocoa/tab_controller_target.h"
@@ -96,6 +99,12 @@ class ToolbarModel;
// Manages per-tab sheets.
scoped_nsobject<GTMWindowSheetController> sheetController_;
+
+ // GTMWindowSheetController supports only one per-tab sheet at a time.
+ // Thus, keep a queue of sheets for every tab. The first element in the queue
+ // is the currently visible sheet, and when this sheet is closed, the next
+ // sheet in the queue will be shown.
+ std::map<NSView*, std::deque<ConstrainedWindowMac*> > constrainedWindows_;
}
// Initialize the controller with a view and browser that contains
@@ -169,7 +178,9 @@ class ToolbarModel;
// for the per-tab sheets.
- (GTMWindowSheetController*)sheetController;
-- (void)attachConstrainedWindow:(ConstrainedWindowMac*)window;
+// See comments in browser_window_controller.h for documentation about these
+// functions.
+- (BOOL)attachConstrainedWindow:(ConstrainedWindowMac*)window;
- (void)removeConstrainedWindow:(ConstrainedWindowMac*)window;
@end
« no previous file with comments | « chrome/browser/cocoa/constrained_window_mac.mm ('k') | chrome/browser/cocoa/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698