Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ | 5 #ifndef UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ |
| 6 #define UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ | 6 #define UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 // bitmap is owned by the resource bundle and should not be freed. | 170 // bitmap is owned by the resource bundle and should not be freed. |
| 171 // | 171 // |
| 172 // !! THIS IS DEPRECATED. PLEASE USE THE METHOD BELOW. !! | 172 // !! THIS IS DEPRECATED. PLEASE USE THE METHOD BELOW. !! |
| 173 SkBitmap* GetBitmapNamed(int resource_id); | 173 SkBitmap* GetBitmapNamed(int resource_id); |
| 174 | 174 |
| 175 // Gets image with the specified resource_id from the current module data. | 175 // Gets image with the specified resource_id from the current module data. |
| 176 // Returns a pointer to a shared instance of gfx::ImageSkia. This shared | 176 // Returns a pointer to a shared instance of gfx::ImageSkia. This shared |
| 177 // instance is owned by the resource bundle and should not be freed. | 177 // instance is owned by the resource bundle and should not be freed. |
| 178 // TODO(pkotwicz): Make method return const gfx::ImageSkia* | 178 // TODO(pkotwicz): Make method return const gfx::ImageSkia* |
| 179 // | 179 // |
| 180 // NOTE: It is preferrable to use GetImageNamed such that code is more | 180 // NOTE: GetImageNamed is preferred for cross-platform gfx::Image use, |
|
Robert Sesek
2012/09/20 17:37:35
GetNativeImageNamed, per below.
sail
2012/09/20 17:40:04
I don't think this comment is correct.
Unless you
| |
| 181 // portable. | 181 // but GetImageSkiaNamed is preferred for Views-specific use. |
| 182 gfx::ImageSkia* GetImageSkiaNamed(int resource_id); | 182 gfx::ImageSkia* GetImageSkiaNamed(int resource_id); |
| 183 | 183 |
| 184 // Gets an image resource from the current module data. This will load the | 184 // Gets an image resource from the current module data. This will load the |
| 185 // image in Skia format by default. The ResourceBundle owns this. | 185 // image in Skia format by default. The ResourceBundle owns this. |
| 186 gfx::Image& GetImageNamed(int resource_id); | 186 gfx::Image& GetImageNamed(int resource_id); |
| 187 | 187 |
| 188 // Similar to GetImageNamed, but rather than loading the image in Skia format, | 188 // Similar to GetImageNamed, but rather than loading the image in Skia format, |
| 189 // it will load in the native platform type. This can avoid conversion from | 189 // it will load in the native platform type. This can avoid conversion from |
| 190 // one image type to another. ResourceBundle owns the result. | 190 // one image type to another. ResourceBundle owns the result. |
| 191 // | 191 // |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 333 | 333 |
| 334 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); | 334 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); |
| 335 }; | 335 }; |
| 336 | 336 |
| 337 } // namespace ui | 337 } // namespace ui |
| 338 | 338 |
| 339 // TODO(beng): Someday, maybe, get rid of this. | 339 // TODO(beng): Someday, maybe, get rid of this. |
| 340 using ui::ResourceBundle; | 340 using ui::ResourceBundle; |
| 341 | 341 |
| 342 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ | 342 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ |
| OLD | NEW |