| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_COCOA_IMAGE_CACHE_H_ | 5 #ifndef CHROME_BROWSER_COCOA_NSIMAGE_CACHE_H_ |
| 6 #define CHROME_BROWSER_COCOA_IMAGE_CACHE_H_ | 6 #define CHROME_BROWSER_COCOA_NSIMAGE_CACHE_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 namespace nsimage_cache { | 10 namespace nsimage_cache { |
| 11 | 11 |
| 12 // Returns an autoreleased image from the main app bundle | 12 // Returns an autoreleased image from the main app bundle |
| 13 // (mac_util::MainAppBundle()) with the given name, and keeps it in memory so | 13 // (mac_util::MainAppBundle()) with the given name, and keeps it in memory so |
| 14 // future fetches are fast. | 14 // future fetches are fast. |
| 15 // NOTE: | 15 // NOTE: |
| 16 // - This should only be called on the main thread. | 16 // - This should only be called on the main thread. |
| 17 // - The caller should retain the image if they want to keep it around, as | 17 // - The caller should retain the image if they want to keep it around, as |
| 18 // the cache could have limit on size/lifetime, etc. | 18 // the cache could have limit on size/lifetime, etc. |
| 19 NSImage *ImageNamed(NSString* name); | 19 NSImage *ImageNamed(NSString* name); |
| 20 | 20 |
| 21 // Clears the cache. | 21 // Clears the cache. |
| 22 void Clear(void); | 22 void Clear(void); |
| 23 | 23 |
| 24 } | 24 } // namespace nsimage_cache |
| 25 | 25 |
| 26 #endif // CHROME_BROWSER_COCOA_IMAGE_CACHE_H_ | 26 #endif // CHROME_BROWSER_COCOA_NSIMAGE_CACHE_H_ |
| OLD | NEW |