// Copyright (c) 2013 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #ifndef ELECTRON_SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_ #define ELECTRON_SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_ #include "base/functional/callback.h" #include "base/mac/scoped_nsobject.h" #include "base/mac/scoped_sending_event.h" #import #import @interface AtomApplication : NSApplication { @private BOOL handlingSendEvent_; base::scoped_nsobject currentActivity_; NSCondition* handoffLock_; BOOL updateReceived_; BOOL userStoppedShutdown_; base::RepeatingCallback shouldShutdown_; } + (AtomApplication*)sharedApplication; - (void)setShutdownHandler:(base::RepeatingCallback)handler; - (void)registerURLHandler; // Called when macOS itself is shutting down. - (void)willPowerOff:(NSNotification*)notify; // CrAppProtocol: - (BOOL)isHandlingSendEvent; // CrAppControlProtocol: - (void)setHandlingSendEvent:(BOOL)handlingSendEvent; - (NSUserActivity*)getCurrentActivity; - (void)setCurrentActivity:(NSString*)type withUserInfo:(NSDictionary*)userInfo withWebpageURL:(NSURL*)webpageURL; - (void)invalidateCurrentActivity; - (void)resignCurrentActivity; - (void)updateCurrentActivity:(NSString*)type withUserInfo:(NSDictionary*)userInfo; @end #endif // ELECTRON_SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_