| OLD | NEW |
| 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 <Carbon/Carbon.h> | |
| 9 #include <stdint.h> | 8 #include <stdint.h> |
| 10 #include <string> | 9 #include <string> |
| 11 | 10 |
| 11 #import <CoreGraphics/CoreGraphics.h> |
| 12 |
| 12 #include "base/base_export.h" | 13 #include "base/base_export.h" |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 | 16 |
| 16 class FilePath; | 17 class FilePath; |
| 17 | 18 |
| 18 namespace mac { | 19 namespace mac { |
| 19 | 20 |
| 20 // Full screen modes, in increasing order of priority. More permissive modes | 21 // Full screen modes, in increasing order of priority. More permissive modes |
| 21 // take predecence. | 22 // take predecence. |
| 22 enum FullScreenMode { | 23 enum FullScreenMode { |
| 23 kFullScreenModeHideAll = 0, | 24 kFullScreenModeHideAll = 0, |
| 24 kFullScreenModeHideDock = 1, | 25 kFullScreenModeHideDock = 1, |
| 25 kFullScreenModeAutoHideAll = 2, | 26 kFullScreenModeAutoHideAll = 2, |
| 26 kNumFullScreenModes = 3, | 27 kNumFullScreenModes = 3, |
| 27 | 28 |
| 28 // kFullScreenModeNormal is not a valid FullScreenMode, but it is useful to | 29 // kFullScreenModeNormal is not a valid FullScreenMode, but it is useful to |
| 29 // other classes, so we include it here. | 30 // other classes, so we include it here. |
| 30 kFullScreenModeNormal = 10, | 31 kFullScreenModeNormal = 10, |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 BASE_EXPORT std::string PathFromFSRef(const FSRef& ref); | |
| 34 BASE_EXPORT bool FSRefFromPath(const std::string& path, FSRef* ref); | |
| 35 | |
| 36 // Returns an sRGB color space. The return value is a static value; do not | 34 // Returns an sRGB color space. The return value is a static value; do not |
| 37 // release it! | 35 // release it! |
| 38 BASE_EXPORT CGColorSpaceRef GetSRGBColorSpace(); | 36 BASE_EXPORT CGColorSpaceRef GetSRGBColorSpace(); |
| 39 | 37 |
| 40 // Returns the generic RGB color space. The return value is a static value; do | 38 // Returns the generic RGB color space. The return value is a static value; do |
| 41 // not release it! | 39 // not release it! |
| 42 BASE_EXPORT CGColorSpaceRef GetGenericRGBColorSpace(); | 40 BASE_EXPORT CGColorSpaceRef GetGenericRGBColorSpace(); |
| 43 | 41 |
| 44 // Returns the color space being used by the main display. The return value | 42 // Returns the color space being used by the main display. The return value |
| 45 // is a static value; do not release it! | 43 // is a static value; do not release it! |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // If any error occurs, none of the input pointers are touched. | 167 // If any error occurs, none of the input pointers are touched. |
| 170 BASE_EXPORT bool ParseModelIdentifier(const std::string& ident, | 168 BASE_EXPORT bool ParseModelIdentifier(const std::string& ident, |
| 171 std::string* type, | 169 std::string* type, |
| 172 int32_t* major, | 170 int32_t* major, |
| 173 int32_t* minor); | 171 int32_t* minor); |
| 174 | 172 |
| 175 } // namespace mac | 173 } // namespace mac |
| 176 } // namespace base | 174 } // namespace base |
| 177 | 175 |
| 178 #endif // BASE_MAC_MAC_UTIL_H_ | 176 #endif // BASE_MAC_MAC_UTIL_H_ |
| OLD | NEW |