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

Side by Side Diff: ui/gfx/image/image.h

Issue 9586018: Add support for multiple icon sizes for Mac platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 8 years, 9 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 | « chrome/browser/web_applications/web_app_mac_unittest.mm ('k') | ui/gfx/image/image.cc » ('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) 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 // An Image wraps an image any flavor, be it platform-native GdkBitmap/NSImage, 5 // An Image wraps an image any flavor, be it platform-native GdkBitmap/NSImage,
6 // or a SkBitmap. This also provides easy conversion to other image types 6 // or a SkBitmap. This also provides easy conversion to other image types
7 // through operator overloading. It will cache the converted representations 7 // through operator overloading. It will cache the converted representations
8 // internally to prevent double-conversion. 8 // internally to prevent double-conversion.
9 // 9 //
10 // The lifetime of both the initial representation and any converted ones are 10 // The lifetime of both the initial representation and any converted ones are
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 #elif defined(OS_MACOSX) 103 #elif defined(OS_MACOSX)
104 NSImage* ToNSImage() const; 104 NSImage* ToNSImage() const;
105 #endif 105 #endif
106 106
107 // Performs a conversion, like above, but returns a copy of the result rather 107 // Performs a conversion, like above, but returns a copy of the result rather
108 // than a weak pointer. The caller is responsible for deleting the result. 108 // than a weak pointer. The caller is responsible for deleting the result.
109 // Note that the result is only a copy in terms of memory management; the 109 // Note that the result is only a copy in terms of memory management; the
110 // backing pixels are shared amongst all copies (a fact of each of the 110 // backing pixels are shared amongst all copies (a fact of each of the
111 // converted representations, rather than a limitation imposed by Image) and 111 // converted representations, rather than a limitation imposed by Image) and
112 // so the result should be considered immutable. 112 // so the result should be considered immutable.
113 const SkBitmap* CopySkBitmap() const; 113 SkBitmap* CopySkBitmap() const;
114 #if defined(TOOLKIT_USES_GTK) 114 #if defined(TOOLKIT_USES_GTK)
115 GdkPixbuf* CopyGdkPixbuf() const; 115 GdkPixbuf* CopyGdkPixbuf() const;
116 #elif defined(OS_MACOSX) 116 #elif defined(OS_MACOSX)
117 NSImage* CopyNSImage() const; 117 NSImage* CopyNSImage() const;
118 #endif 118 #endif
119 119
120 // DEPRECATED ---------------------------------------------------------------- 120 // DEPRECATED ----------------------------------------------------------------
121 // Conversion handlers. These wrap the ToType() variants. 121 // Conversion handlers. These wrap the ToType() variants.
122 operator const SkBitmap*() const; 122 operator const SkBitmap*() const;
123 operator const SkBitmap&() const; 123 operator const SkBitmap&() const;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // be cheaply copied. 165 // be cheaply copied.
166 scoped_refptr<internal::ImageStorage> storage_; 166 scoped_refptr<internal::ImageStorage> storage_;
167 167
168 friend class ::ImageTest; 168 friend class ::ImageTest;
169 friend class ::ImageMacTest; 169 friend class ::ImageMacTest;
170 }; 170 };
171 171
172 } // namespace gfx 172 } // namespace gfx
173 173
174 #endif // UI_GFX_IMAGE_IMAGE_H_ 174 #endif // UI_GFX_IMAGE_IMAGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/web_applications/web_app_mac_unittest.mm ('k') | ui/gfx/image/image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698