diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-13 18:44:21 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-13 18:44:21 +0000 |
commit | 22eeb168b8bfd02c8a4a9521a819067e25674b95 (patch) | |
tree | 7301665e67526024260e52478ebebde760f1ec1f /chrome/browser/cocoa/constrained_window_mac.mm | |
parent | d37fe632a386d29653f91564677186ff7403d8dc (diff) | |
download | chromium_src-22eeb168b8bfd02c8a4a9521a819067e25674b95.zip chromium_src-22eeb168b8bfd02c8a4a9521a819067e25674b95.tar.gz chromium_src-22eeb168b8bfd02c8a4a9521a819067e25674b95.tar.bz2 |
Mac: Only show one per-tab sheet at a time per tab.
BUG=26900
TEST=Go to http://www/~thakis/cgi-bin/test.html . Test that two sheets show up (the first expects "u" as user and no pass, the other "v" and no pass). The first sheet appears immediately, the second after 2 seconds. Try entering u for the first faster than 2 seconds and switch tabs, when coming back to the original tab, the 2nd sheet should wait for you. Try closing the window and the tab while a sheet is showing, both when the tab with the sheet is in the background and in the foreground.
Review URL: http://codereview.chromium.org/384113
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31920 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/constrained_window_mac.mm')
-rw-r--r-- | chrome/browser/cocoa/constrained_window_mac.mm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/constrained_window_mac.mm b/chrome/browser/cocoa/constrained_window_mac.mm index ed5cba0..ad090a8 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); } |