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

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

Issue 10933083: Remove deprecated gfx::Image::operator NSImage*(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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
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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // so the result should be considered immutable. 130 // so the result should be considered immutable.
131 std::vector<unsigned char>* CopyImagePNG() const; 131 std::vector<unsigned char>* CopyImagePNG() const;
132 ImageSkia* CopyImageSkia() const; 132 ImageSkia* CopyImageSkia() const;
133 SkBitmap* CopySkBitmap() const; 133 SkBitmap* CopySkBitmap() const;
134 #if defined(TOOLKIT_GTK) 134 #if defined(TOOLKIT_GTK)
135 GdkPixbuf* CopyGdkPixbuf() const; 135 GdkPixbuf* CopyGdkPixbuf() const;
136 #elif defined(OS_MACOSX) 136 #elif defined(OS_MACOSX)
137 NSImage* CopyNSImage() const; 137 NSImage* CopyNSImage() const;
138 #endif 138 #endif
139 139
140 // DEPRECATED ----------------------------------------------------------------
141 // Conversion handlers. These wrap the ToType() variants.
142 #if defined(OS_MACOSX)
143 operator NSImage*() const;
144 #endif
145 // ---------------------------------------------------------------------------
146
147 // Inspects the representations map to see if the given type exists. 140 // Inspects the representations map to see if the given type exists.
148 bool HasRepresentation(RepresentationType type) const; 141 bool HasRepresentation(RepresentationType type) const;
149 142
150 // Returns the number of representations. 143 // Returns the number of representations.
151 size_t RepresentationCount() const; 144 size_t RepresentationCount() const;
152 145
153 // Returns true if this Image has no representations. 146 // Returns true if this Image has no representations.
154 bool IsEmpty() const; 147 bool IsEmpty() const;
155 148
156 // Swaps this image's internal representations with |other|. 149 // Swaps this image's internal representations with |other|.
(...skipping 15 matching lines...) Expand all
172 // be cheaply copied. 165 // be cheaply copied.
173 scoped_refptr<internal::ImageStorage> storage_; 166 scoped_refptr<internal::ImageStorage> storage_;
174 167
175 friend class ::ImageTest; 168 friend class ::ImageTest;
176 friend class ::ImageMacTest; 169 friend class ::ImageMacTest;
177 }; 170 };
178 171
179 } // namespace gfx 172 } // namespace gfx
180 173
181 #endif // UI_GFX_IMAGE_IMAGE_H_ 174 #endif // UI_GFX_IMAGE_IMAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698