Add Browser class to controll when the application should quit.

This commit is contained in:
Cheng Zhao 2013-05-02 23:43:23 +08:00
parent 8cf1050730
commit d151d494bd
12 changed files with 138 additions and 7 deletions

View file

@ -5,8 +5,7 @@
#import "browser/atom_application_mac.h"
#include "base/auto_reset.h"
#include "base/logging.h"
#include "browser/window_list.h"
#include "browser/browser.h"
@implementation AtomApplication
@ -28,11 +27,7 @@
}
- (IBAction)closeAllWindows:(id)sender {
atom::WindowList* window_list = atom::WindowList::GetInstance();
if (window_list->size() == 0)
[self terminate:self];
window_list->CloseAllWindows();
atom::Browser::Get()->Quit();
}
@end