From 4e75fb448ae3804571300ea5c27f6f46ad03a2e1 Mon Sep 17 00:00:00 2001 From: Roger Wang Date: Thu, 12 Dec 2019 02:20:49 -0700 Subject: [PATCH] Fix: nw2: close event missing callback string during cmd + Q (OSX) Fix nwjs/nw.js#7263 Ref nwjs/nw.js#7242 --- chrome/browser/browser_process_platform_part_mac.mm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chrome/browser/browser_process_platform_part_mac.mm b/chrome/browser/browser_process_platform_part_mac.mm index 1c08654b70089..80f597ae13e8d 100644 --- a/chrome/browser/browser_process_platform_part_mac.mm +++ b/chrome/browser/browser_process_platform_part_mac.mm @@ -4,6 +4,8 @@ #include "chrome/browser/browser_process_platform_part_mac.h" +#include "chrome/browser/lifetime/application_lifetime.h" + #include "base/mac/foundation_util.h" #import "chrome/browser/app_controller_mac.h" #include "chrome/browser/chrome_browser_application_mac.h" @@ -29,15 +31,17 @@ // come down this code path at all.) URL requests to exit have // |try_to_quit_application| set to true; keyboard menu invocations have it // set to false. - if (!try_to_quit_application) { + chrome::CloseAllBrowsers(false, true); + return; +#if 0 // A keyboard menu invocation. AppController* app_controller = base::mac::ObjCCastStrict([NSApp delegate]); if (![app_controller runConfirmQuitPanel]) return; +#endif } - chrome_browser_application_mac::Terminate(); }