Implement shutdown event for macOS

This commit is contained in:
Cheng Zhao 2018-02-05 16:13:35 +09:00
parent c470e758cc
commit 983e1b1a70
7 changed files with 25 additions and 6 deletions

View file

@ -2,8 +2,9 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#import "base/mac/scoped_sending_event.h"
#import "base/mac/scoped_nsobject.h"
#include "base/callback.h"
#include "base/mac/scoped_sending_event.h"
#include "base/mac/scoped_nsobject.h"
@interface AtomApplication : NSApplication<CrAppProtocol,
CrAppControlProtocol,
@ -13,10 +14,13 @@
base::scoped_nsobject<NSUserActivity> currentActivity_;
NSCondition* handoffLock_;
BOOL updateReceived_;
base::Callback<bool()> shouldShutdown_;
}
+ (AtomApplication*)sharedApplication;
- (void)setShutdownHandler:(base::Callback<bool()>)handler;
// CrAppProtocol:
- (BOOL)isHandlingSendEvent;