summaryrefslogtreecommitdiffstats
path: root/base/mac_util.mm
diff options
context:
space:
mode:
Diffstat (limited to 'base/mac_util.mm')
-rw-r--r--base/mac_util.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/mac_util.mm b/base/mac_util.mm
index 6711257..b2e9b6e 100644
--- a/base/mac_util.mm
+++ b/base/mac_util.mm
@@ -43,6 +43,13 @@ bool AmIBundled() {
return info.nodeFlags & kFSNodeIsDirectoryMask;
}
+bool IsBackgroundOnlyProcess() {
+ NSBundle* main_bundle = MainAppBundle();
+ NSDictionary* info_dictionary = [main_bundle infoDictionary];
+ return [[info_dictionary objectForKey:@"LSUIElement"]
+ isEqualToString:@"1"] ? true : false;
+}
+
// No threading worries since NSBundle isn't thread safe.
static NSBundle* g_override_app_bundle = nil;