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

Side by Side Diff: base/nsimage_cache_mac.h

Issue 243100: Move nsimage_cache into base so that it can be accessed from outside of chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months 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 | « base/base.gyp ('k') | base/nsimage_cache_mac.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) 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_NSIMAGE_CACHE_H_ 5 #ifndef BASE_NSIMAGE_CACHE_MAC_H_
6 #define CHROME_BROWSER_COCOA_NSIMAGE_CACHE_H_ 6 #define BASE_NSIMAGE_CACHE_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #ifdef __OBJC__
9 @class NSImage;
10 @class NSString;
11 #else
12 class NSImage;
13 class NSString;
14 #endif
9 15
10 namespace nsimage_cache { 16 namespace nsimage_cache {
11 17
12 // Returns an autoreleased image from the main app bundle 18 // Returns an autoreleased image from the main app bundle
13 // (mac_util::MainAppBundle()) with the given name, and keeps it in memory so 19 // (mac_util::MainAppBundle()) with the given name, and keeps it in memory so
14 // future fetches are fast. 20 // future fetches are fast.
15 // NOTE: 21 // NOTE:
16 // - This should only be called on the main thread. 22 // - This should only be called on the main thread.
17 // - The caller should retain the image if they want to keep it around, as 23 // - The caller should retain the image if they want to keep it around, as
18 // the cache could have limit on size/lifetime, etc. 24 // the cache could have limit on size/lifetime, etc.
19 NSImage *ImageNamed(NSString* name); 25 NSImage* ImageNamed(NSString* name);
20 26
21 // Clears the cache. 27 // Clears the cache.
22 void Clear(void); 28 void Clear(void);
23 29
24 } // namespace nsimage_cache 30 } // namespace nsimage_cache
25 31
26 #endif // CHROME_BROWSER_COCOA_NSIMAGE_CACHE_H_ 32 #endif // BASE_NSIMAGE_CACHE_MAC_H_
OLDNEW
« no previous file with comments | « base/base.gyp ('k') | base/nsimage_cache_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698