diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-22 21:13:51 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-22 21:13:51 +0000 |
commit | 8ecce348742249122fbaf4a21870c849e4876d04 (patch) | |
tree | 8e2af74412c7dab1e6236dbd98e9cb88f28185c8 /chrome/browser/app_controller_mac.mm | |
parent | ca57825692d6af2d3425d2f37490b9255a058210 (diff) | |
download | chromium_src-8ecce348742249122fbaf4a21870c849e4876d04.zip chromium_src-8ecce348742249122fbaf4a21870c849e4876d04.tar.gz chromium_src-8ecce348742249122fbaf4a21870c849e4876d04.tar.bz2 |
[Mac] Make the Confirm to Quit floaty panel a singleton so multiple panels do not appear.
BUG=61815
TEST=With the confirm-to-quit lab enabled, mash Cmd+Q. Only 1 floaty window appears.
Review URL: http://codereview.chromium.org/5255001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index edb15d6..9a5052e 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -295,10 +295,8 @@ void RecordLastRunAppBundlePath() { // http://dev.chromium.org/developers/design-documents/confirm-to-quit-experiment NSEvent* currentEvent = [app currentEvent]; if ([currentEvent type] == NSKeyDown) { - ConfirmQuitPanelController* quitPanel = - [[ConfirmQuitPanelController alloc] init]; // Releases self. // Show the info panel that explains what the user must to do confirm quit. - [quitPanel showWindow:self]; + [[ConfirmQuitPanelController sharedController] showWindow:self]; // How long the user must hold down Cmd+Q to confirm the quit. const NSTimeInterval kTimeToConfirmQuit = 1.5; @@ -361,7 +359,7 @@ void RecordLastRunAppBundlePath() { } else { // Slowly fade the confirm window out in case the user doesn't // understand what they have to do to quit. - [quitPanel dismissPanel]; + [[ConfirmQuitPanelController sharedController] dismissPanel]; return NSTerminateCancel; } } // if event type is KeyDown |