electron/shell/browser/mac/electron_application.h

53 lines
1.6 KiB
C
Raw Normal View History

// Copyright (c) 2013 GitHub, Inc.
2014-04-25 09:49:37 +00:00
// 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_
2018-02-05 07:13:35 +00:00
#include "base/callback.h"
#include "base/mac/scoped_nsobject.h"
2018-04-18 01:44:10 +00:00
#include "base/mac/scoped_sending_event.h"
#import <AVFoundation/AVFoundation.h>
#import <LocalAuthentication/LocalAuthentication.h>
@interface AtomApplication : NSApplication <CrAppProtocol,
CrAppControlProtocol,
NSUserActivityDelegate> {
@private
BOOL handlingSendEvent_;
base::scoped_nsobject<NSUserActivity> currentActivity_;
2017-09-14 07:12:34 +00:00
NSCondition* handoffLock_;
BOOL updateReceived_;
BOOL userStoppedShutdown_;
base::RepeatingCallback<bool()> shouldShutdown_;
}
+ (AtomApplication*)sharedApplication;
- (void)setShutdownHandler:(base::RepeatingCallback<bool()>)handler;
- (void)registerURLHandler;
2018-02-05 07:13:35 +00:00
// Called when macOS itself is shutting down.
- (void)willPowerOff:(NSNotification*)notify;
// CrAppProtocol:
- (BOOL)isHandlingSendEvent;
// CrAppControlProtocol:
- (void)setHandlingSendEvent:(BOOL)handlingSendEvent;
- (NSUserActivity*)getCurrentActivity;
2016-05-23 15:49:46 +00:00
- (void)setCurrentActivity:(NSString*)type
withUserInfo:(NSDictionary*)userInfo
withWebpageURL:(NSURL*)webpageURL;
- (void)invalidateCurrentActivity;
- (void)resignCurrentActivity;
2017-09-14 07:12:34 +00:00
- (void)updateCurrentActivity:(NSString*)type
withUserInfo:(NSDictionary*)userInfo;
@end
#endif // ELECTRON_SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_