diff options
author | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-16 17:47:57 +0000 |
---|---|---|
committer | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-16 17:47:57 +0000 |
commit | 1bcdb53dbddb785f5538cb7081b073db90c822d1 (patch) | |
tree | 9b67e0a51f98ff2d0f0bb3462f530a08a8b7e6c4 /chrome/browser/app_controller_mac.mm | |
parent | 091db5d0615084d28dfbb78d8dd6c0e169b510a4 (diff) | |
download | chromium_src-1bcdb53dbddb785f5538cb7081b073db90c822d1.zip chromium_src-1bcdb53dbddb785f5538cb7081b073db90c822d1.tar.gz chromium_src-1bcdb53dbddb785f5538cb7081b073db90c822d1.tar.bz2 |
mac bootstrapping of browser main and app startup bits
Review URL: http://codereview.chromium.org/18112
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8185 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm new file mode 100644 index 0000000..cf0c49f --- /dev/null +++ b/chrome/browser/app_controller_mac.mm @@ -0,0 +1,27 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "app_controller_mac.h" + +#import "base/message_loop.h" + +@implementation AppController + +// We can't use the standard terminate: method because it will abrubptly exit +// the app and leave things on the stack in an unfinalized state. We need to +// post a quit message to our run loop so the stack can gracefully unwind. +- (IBAction)quit:(id)sender { + // TODO(pinkerton): + // since we have to roll it ourselves, ask the delegate (ourselves, really) + // if we should terminate. For example, we might not want to if the user + // has ongoing downloads or multiple windows/tabs open. However, this would + // require posting UI and may require spinning up another run loop to + // handle it. If it says to continue, post the quit message, otherwise + // go back to normal. + + MessageLoopForUI::current()->Quit(); +} + + +@end |