diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-06 19:35:38 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-06 19:35:38 +0000 |
commit | 85f1ee1d545b7d7874969ea5fe7e63fef7d2b0c5 (patch) | |
tree | bb253dbea59012936c295988aeb14769100871f9 /ui/views/controls/tree/tree_view_win.cc | |
parent | 827dd68138102ad248544775cb50def6bf8a4933 (diff) | |
download | chromium_src-85f1ee1d545b7d7874969ea5fe7e63fef7d2b0c5.zip chromium_src-85f1ee1d545b7d7874969ea5fe7e63fef7d2b0c5.tar.gz chromium_src-85f1ee1d545b7d7874969ea5fe7e63fef7d2b0c5.tar.bz2 |
views: Do not use deprecated ResourceBundle::GetBitmapNamed() function.
Instead use the recommended ResourceBundle::GetImageNamed() function and
convert it to the native type appropriately.
BUG=58030
R=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9597022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125201 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/controls/tree/tree_view_win.cc')
-rw-r--r-- | ui/views/controls/tree/tree_view_win.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/views/controls/tree/tree_view_win.cc b/ui/views/controls/tree/tree_view_win.cc index 33d271a..8edd56a 100644 --- a/ui/views/controls/tree/tree_view_win.cc +++ b/ui/views/controls/tree/tree_view_win.cc @@ -22,6 +22,7 @@ #include "ui/gfx/canvas_skia_paint.h" #include "ui/gfx/favicon_size.h" #include "ui/gfx/icon_util.h" +#include "ui/gfx/image/image.h" #include "ui/gfx/point.h" #include "ui/views/controls/tree/tree_view_controller.h" #include "ui/views/focus/focus_manager.h" @@ -662,14 +663,13 @@ HIMAGELIST TreeView::CreateImageList() { std::vector<SkBitmap> model_images; model_->GetIcons(&model_images); + ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); bool rtl = base::i18n::IsRTL(); // Creates the default image list used for trees. - SkBitmap* closed_icon = - ResourceBundle::GetSharedInstance().GetBitmapNamed( - (rtl ? IDR_FOLDER_CLOSED_RTL : IDR_FOLDER_CLOSED)); - SkBitmap* opened_icon = - ResourceBundle::GetSharedInstance().GetBitmapNamed( - (rtl ? IDR_FOLDER_OPEN_RTL : IDR_FOLDER_OPEN)); + const SkBitmap* closed_icon = rb.GetImageNamed( + (rtl ? IDR_FOLDER_CLOSED_RTL : IDR_FOLDER_CLOSED)).ToSkBitmap(); + const SkBitmap* opened_icon = rb.GetImageNamed( + (rtl ? IDR_FOLDER_OPEN_RTL : IDR_FOLDER_OPEN)).ToSkBitmap(); int width = closed_icon->width(); int height = closed_icon->height(); DCHECK(opened_icon->width() == width && opened_icon->height() == height); |