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

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

Issue 7055010: Rename internal gfx::Image members to be less confusing with Cocoa types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac Created 9 years, 7 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 | « ui/base/resource/resource_bundle_mac.mm ('k') | ui/gfx/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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 25 matching lines...) Expand all
36 namespace gfx { 36 namespace gfx {
37 37
38 namespace internal { 38 namespace internal {
39 class ImageRep; 39 class ImageRep;
40 class ImageStorage; 40 class ImageStorage;
41 } 41 }
42 42
43 class Image { 43 class Image {
44 public: 44 public:
45 enum RepresentationType { 45 enum RepresentationType {
46 kGdkPixbufRep, 46 kImageRepGdk,
47 kNSImageRep, 47 kImageRepCocoa,
48 kSkBitmapRep, 48 kImageRepSkia,
49 }; 49 };
50 50
51 typedef std::map<RepresentationType, internal::ImageRep*> RepresentationMap; 51 typedef std::map<RepresentationType, internal::ImageRep*> RepresentationMap;
52 52
53 // Creates a new image with the default representation. The object will take 53 // Creates a new image with the default representation. The object will take
54 // ownership of the image. 54 // ownership of the image.
55 explicit Image(const SkBitmap* bitmap); 55 explicit Image(const SkBitmap* bitmap);
56 56
57 // To create an Image that supports multiple resolutions pass a vector 57 // To create an Image that supports multiple resolutions pass a vector
58 // of bitmaps, one for each resolution. 58 // of bitmaps, one for each resolution.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // be cheaply copied. 121 // be cheaply copied.
122 scoped_refptr<internal::ImageStorage> storage_; 122 scoped_refptr<internal::ImageStorage> storage_;
123 123
124 friend class ::ImageTest; 124 friend class ::ImageTest;
125 friend class ::ImageMacTest; 125 friend class ::ImageMacTest;
126 }; 126 };
127 127
128 } // namespace gfx 128 } // namespace gfx
129 129
130 #endif // UI_GFX_IMAGE_H_ 130 #endif // UI_GFX_IMAGE_H_
OLDNEW
« no previous file with comments | « ui/base/resource/resource_bundle_mac.mm ('k') | ui/gfx/image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698