diff options
author | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-21 16:41:33 +0000 |
---|---|---|
committer | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-21 16:41:33 +0000 |
commit | 8a53ee044de003495430e48203c8606dbf9aa261 (patch) | |
tree | d6171016214fa15a4b586b008a5b75f0e0777a96 /chrome/browser/app_controller_mac.mm | |
parent | 9c19aa146af6d80de43f00fd109a43bb8f018b24 (diff) | |
download | chromium_src-8a53ee044de003495430e48203c8606dbf9aa261.zip chromium_src-8a53ee044de003495430e48203c8606dbf9aa261.tar.gz chromium_src-8a53ee044de003495430e48203c8606dbf9aa261.tar.bz2 |
Get browser window showing using a Browser object and accompanying scaffolding. Adds browser window controller and shim from NSWindow to BrowserWindow.
Review URL: http://codereview.chromium.org/18368
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8364 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index cf0c49f..16073d8 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -5,13 +5,14 @@ #import "app_controller_mac.h" #import "base/message_loop.h" +#import "chrome/browser/browser_list.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 { +- (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 @@ -19,6 +20,14 @@ // 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. + + // Close all the windows. + // TODO(pinkerton): the close code assumes that teardown happens + // synchronously, however with autorelease pools and ref-counting, we can't + // guarantee the window controller hits 0 inside this call, and thus the + // number of Browsers still alive will certainly be non-zero. Not sure yet + // how to handle this case. + // BrowserList::CloseAllBrowsers(false); MessageLoopForUI::current()->Quit(); } |