Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2618)

Unified Diff: base/mac/mac_util.mm

Issue 2394733002: [Mac Fix-It] removed base::mac::AmIForeground function. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698