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

Side by Side Diff: base/mac/mac_util.h

Issue 45253002: Do not use set process names in the Activity Monitor, using Process Manager functions in the proces… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: grd fix Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/mac/mac_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_MAC_MAC_UTIL_H_ 5 #ifndef BASE_MAC_MAC_UTIL_H_
6 #define BASE_MAC_MAC_UTIL_H_ 6 #define BASE_MAC_MAC_UTIL_H_
7 7
8 #include <AvailabilityMacros.h> 8 #include <AvailabilityMacros.h>
9 #include <Carbon/Carbon.h> 9 #include <Carbon/Carbon.h>
10 #include <string> 10 #include <string>
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 BASE_EXPORT void ActivateProcess(pid_t pid); 85 BASE_EXPORT void ActivateProcess(pid_t pid);
86 86
87 // Returns true if this process is in the foreground, meaning that it's the 87 // Returns true if this process is in the foreground, meaning that it's the
88 // frontmost process, the one whose menu bar is shown at the top of the main 88 // frontmost process, the one whose menu bar is shown at the top of the main
89 // display. 89 // display.
90 BASE_EXPORT bool AmIForeground(); 90 BASE_EXPORT bool AmIForeground();
91 91
92 // Excludes the file given by |file_path| from being backed up by Time Machine. 92 // Excludes the file given by |file_path| from being backed up by Time Machine.
93 BASE_EXPORT bool SetFileBackupExclusion(const FilePath& file_path); 93 BASE_EXPORT bool SetFileBackupExclusion(const FilePath& file_path);
94 94
95 // Sets the process name as displayed in Activity Monitor to process_name.
96 BASE_EXPORT void SetProcessName(CFStringRef process_name);
97
98 // Converts a NSImage to a CGImageRef. Normally, the system frameworks can do 95 // Converts a NSImage to a CGImageRef. Normally, the system frameworks can do
99 // this fine, especially on 10.6. On 10.5, however, CGImage cannot handle 96 // this fine, especially on 10.6. On 10.5, however, CGImage cannot handle
100 // converting a PDF-backed NSImage into a CGImageRef. This function will 97 // converting a PDF-backed NSImage into a CGImageRef. This function will
101 // rasterize the PDF into a bitmap CGImage. The caller is responsible for 98 // rasterize the PDF into a bitmap CGImage. The caller is responsible for
102 // releasing the return value. 99 // releasing the return value.
103 BASE_EXPORT CGImageRef CopyNSImageToCGImage(NSImage* image); 100 BASE_EXPORT CGImageRef CopyNSImageToCGImage(NSImage* image);
104 101
105 // Checks if the current application is set as a Login Item, so it will launch 102 // Checks if the current application is set as a Login Item, so it will launch
106 // on Login. If a non-NULL pointer to is_hidden is passed, the Login Item also 103 // on Login. If a non-NULL pointer to is_hidden is passed, the Login Item also
107 // is queried for the 'hide on launch' flag. 104 // is queried for the 'hide on launch' flag.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // If any error occurs, none of the input pointers are touched. 211 // If any error occurs, none of the input pointers are touched.
215 BASE_EXPORT bool ParseModelIdentifier(const std::string& ident, 212 BASE_EXPORT bool ParseModelIdentifier(const std::string& ident,
216 std::string* type, 213 std::string* type,
217 int32* major, 214 int32* major,
218 int32* minor); 215 int32* minor);
219 216
220 } // namespace mac 217 } // namespace mac
221 } // namespace base 218 } // namespace base
222 219
223 #endif // BASE_MAC_MAC_UTIL_H_ 220 #endif // BASE_MAC_MAC_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/mac/mac_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698