| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BASE_NSIMAGE_CACHE_MAC_H_ | |
| 6 #define BASE_NSIMAGE_CACHE_MAC_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #ifdef __OBJC__ | |
| 10 @class NSImage; | |
| 11 @class NSString; | |
| 12 #else | |
| 13 class NSImage; | |
| 14 class NSString; | |
| 15 #endif | |
| 16 | |
| 17 namespace nsimage_cache { | |
| 18 | |
| 19 // Returns an autoreleased image from the main app bundle | |
| 20 // (mac_util::MainAppBundle()) with the given name, and keeps it in memory so | |
| 21 // future fetches are fast. | |
| 22 // NOTE: | |
| 23 // - This should only be called on the main thread. | |
| 24 // - The caller should retain the image if they want to keep it around, as | |
| 25 // the cache could have limit on size/lifetime, etc. | |
| 26 NSImage* ImageNamed(NSString* name); | |
| 27 | |
| 28 // Clears the cache. | |
| 29 void Clear(void); | |
| 30 | |
| 31 } // namespace nsimage_cache | |
| 32 | |
| 33 #endif // BASE_NSIMAGE_CACHE_MAC_H_ | |
| OLD | NEW |