| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <AvailabilityMacros.h> | 9 #include <AvailabilityMacros.h> |
| 10 #include <Carbon/Carbon.h> | 10 #include <Carbon/Carbon.h> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 // Set the visibility of the cursor. | 72 // Set the visibility of the cursor. |
| 73 void SetCursorVisibility(bool visible); | 73 void SetCursorVisibility(bool visible); |
| 74 | 74 |
| 75 // Should windows miniaturize on a double-click (on the title bar)? | 75 // Should windows miniaturize on a double-click (on the title bar)? |
| 76 bool ShouldWindowsMiniaturizeOnDoubleClick(); | 76 bool ShouldWindowsMiniaturizeOnDoubleClick(); |
| 77 | 77 |
| 78 // Activates the process with the given PID. | 78 // Activates the process with the given PID. |
| 79 void ActivateProcess(pid_t pid); | 79 void ActivateProcess(pid_t pid); |
| 80 | 80 |
| 81 // Returns true if this process is in the foreground, meaning that it's the |
| 82 // frontmost process, the one whose menu bar is shown at the top of the main |
| 83 // display. |
| 84 bool AmIForeground(); |
| 85 |
| 81 // Excludes the file given by |file_path| from being backed up by Time Machine. | 86 // Excludes the file given by |file_path| from being backed up by Time Machine. |
| 82 bool SetFileBackupExclusion(const FilePath& file_path); | 87 bool SetFileBackupExclusion(const FilePath& file_path); |
| 83 | 88 |
| 84 // Sets the process name as displayed in Activity Monitor to process_name. | 89 // Sets the process name as displayed in Activity Monitor to process_name. |
| 85 void SetProcessName(CFStringRef process_name); | 90 void SetProcessName(CFStringRef process_name); |
| 86 | 91 |
| 87 // Converts a NSImage to a CGImageRef. Normally, the system frameworks can do | 92 // Converts a NSImage to a CGImageRef. Normally, the system frameworks can do |
| 88 // this fine, especially on 10.6. On 10.5, however, CGImage cannot handle | 93 // this fine, especially on 10.6. On 10.5, however, CGImage cannot handle |
| 89 // converting a PDF-backed NSImage into a CGImageRef. This function will | 94 // converting a PDF-backed NSImage into a CGImageRef. This function will |
| 90 // rasterize the PDF into a bitmap CGImage. The caller is responsible for | 95 // rasterize the PDF into a bitmap CGImage. The caller is responsible for |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_7 | 164 MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_7 |
| 160 #define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7 | 165 #define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7 |
| 161 inline bool IsOSLion() { return false; } | 166 inline bool IsOSLion() { return false; } |
| 162 inline bool IsOSLaterThanLion() { return true; } | 167 inline bool IsOSLaterThanLion() { return true; } |
| 163 #endif | 168 #endif |
| 164 | 169 |
| 165 } // namespace mac | 170 } // namespace mac |
| 166 } // namespace base | 171 } // namespace base |
| 167 | 172 |
| 168 #endif // BASE_MAC_MAC_UTIL_H_ | 173 #endif // BASE_MAC_MAC_UTIL_H_ |
| OLD | NEW |