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

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

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.h ('k') | chrome/browser/cocoa/tab_strip_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/constrained_window_mac.mm
diff --git a/chrome/browser/cocoa/constrained_window_mac.mm b/chrome/browser/cocoa/constrained_window_mac.mm
index ed5cba0cd897ad76e928396b545193e8899106a9..ad090a81d32ccacef57ea32d7be972de74b6bd8a 100644
--- a/chrome/browser/cocoa/constrained_window_mac.mm
+++ b/chrome/browser/cocoa/constrained_window_mac.mm
@@ -82,7 +82,13 @@ void ConstrainedWindowMac::Realize(BrowserWindowController* controller) {
// Remember the controller we're adding ourselves to, so that we can later
// remove us from it.
- controller_ = controller;
- [controller_ attachConstrainedWindow:this];
+ if ([controller attachConstrainedWindow:this])
+ controller_ = controller;
+}
+
+void ConstrainedWindowMac::SetVisible() {
+ // Only notify the delegate that the sheet is open after the sheet appeared
+ // on screen (as opposed to when the sheet was added to the current tab's
+ // sheet queue).
delegate_->set_sheet_open(true);
}
« no previous file with comments | « chrome/browser/cocoa/constrained_window_mac.h ('k') | chrome/browser/cocoa/tab_strip_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698