Index: base/mac/mac_util.mm |
diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm |
index d4b584debb78cd9f7a61eda786faa7a11bc2f13a..0d2e7bc38b75adcd5b48357fd826ca73ae04041f 100644 |
--- a/base/mac/mac_util.mm |
+++ b/base/mac/mac_util.mm |
@@ -219,23 +219,7 @@ void SwitchFullScreenModes(FullScreenMode from_mode, FullScreenMode to_mode) { |
} |
bool AmIForeground() { |
- ProcessSerialNumber foreground_psn = { 0 }; |
- OSErr err = GetFrontProcess(&foreground_psn); |
- if (err != noErr) { |
- OSSTATUS_DLOG(WARNING, err) << "GetFrontProcess"; |
- return false; |
- } |
- |
- ProcessSerialNumber my_psn = { 0, kCurrentProcess }; |
- |
- Boolean result = FALSE; |
- err = SameProcess(&foreground_psn, &my_psn, &result); |
- if (err != noErr) { |
- OSSTATUS_DLOG(WARNING, err) << "SameProcess"; |
- return false; |
- } |
- |
- return result; |
+ return [[NSApplication sharedApplication] isActive]; |
Nico
2016/10/05 14:19:39
Is [[NSRunningApplication currentApplication] isAc
Eugene But (OOO till 7-30)
2016/10/06 00:31:59
Yeah, that what I asked in the comments (should we
|
} |
bool SetFileBackupExclusion(const FilePath& file_path) { |