Emit a new before-quit event at the start of Browser::Quit, which gives us a chance to cancel before any windows are closed.
This commit is contained in:
parent
0c99f3baa6
commit
b6787a9b34
6 changed files with 32 additions and 4 deletions
|
@ -131,6 +131,10 @@ App::~App() {
|
|||
Browser::Get()->RemoveObserver(this);
|
||||
}
|
||||
|
||||
void App::OnBeforeQuit(bool* prevent_default) {
|
||||
*prevent_default = Emit("before-quit");
|
||||
}
|
||||
|
||||
void App::OnWillQuit(bool* prevent_default) {
|
||||
*prevent_default = Emit("will-quit");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue