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

Side by Side Diff: ui/base/resource/resource_bundle.h

Issue 10970018: Update resource_bundle.h image function comment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Endorse GetNativeImageNamed, remove mention of the Views exception. 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 #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
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: GetNativeImageNamed is preferred for cross-platform gfx::Image use.
181 // portable.
182 gfx::ImageSkia* GetImageSkiaNamed(int resource_id); 181 gfx::ImageSkia* GetImageSkiaNamed(int resource_id);
183 182
184 // Gets an image resource from the current module data. This will load the 183 // Gets an image resource from the current module data. This will load the
185 // image in Skia format by default. The ResourceBundle owns this. 184 // image in Skia format by default. The ResourceBundle owns this.
186 gfx::Image& GetImageNamed(int resource_id); 185 gfx::Image& GetImageNamed(int resource_id);
187 186
188 // Similar to GetImageNamed, but rather than loading the image in Skia format, 187 // 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 188 // it will load in the native platform type. This can avoid conversion from
190 // one image type to another. ResourceBundle owns the result. 189 // one image type to another. ResourceBundle owns the result.
191 // 190 //
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 332
334 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); 333 DISALLOW_COPY_AND_ASSIGN(ResourceBundle);
335 }; 334 };
336 335
337 } // namespace ui 336 } // namespace ui
338 337
339 // TODO(beng): Someday, maybe, get rid of this. 338 // TODO(beng): Someday, maybe, get rid of this.
340 using ui::ResourceBundle; 339 using ui::ResourceBundle;
341 340
342 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ 341 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698