diff options
author | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-14 20:22:01 +0000 |
---|---|---|
committer | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-14 20:22:01 +0000 |
commit | 6c158192e64a230aa18f2ba4dd647d5b1a5a8b1d (patch) | |
tree | 34957fa50c8682e7e2bec16321ff34a2c6aa16aa /chrome/browser/ui | |
parent | fe7d500a0d9a42d358f5f1ca24d4770d9bb3b6cd (diff) | |
download | chromium_src-6c158192e64a230aa18f2ba4dd647d5b1a5a8b1d.zip chromium_src-6c158192e64a230aa18f2ba4dd647d5b1a5a8b1d.tar.gz chromium_src-6c158192e64a230aa18f2ba4dd647d5b1a5a8b1d.tar.bz2 |
Change SetImage, SetBackground, and SetToggledImage to take in a gfx::ImageSkia
The files were changed using the following sed script
1 :top
2 /SetImage/ {
3 s|ToSkBitmap|ToImageSkia|g
4 s|GetBitmapNamed|GetImageSkiaNamed|g
5 n
6 N
7 s|ToSkBitmap|ToImageSkia|g
8 s|GetBitmapNamed|GetImageSkiaNamed|g
9 b top
10 }
11 /SetBackground/ {
12 s|ToSkBitmap|ToImageSkia|g
13 s|GetBitmapNamed|GetImageSkiaNamed|g
14 n
15 N
16 s|ToSkBitmap|ToImageSkia|g
17 s|GetBitmapNamed|GetImageSkiaNamed|g
18 b top
19 }
20 /SetToggledImage/ {
21 s|ToSkBitmap|ToImageSkia|g
22 s|GetBitmapNamed|GetImageSkiaNamed|g
23 n
24 N
25 s|ToSkBitmap|ToImageSkia|g
26 s|GetBitmapNamed|GetImageSkiaNamed|g
27 b top
28 }
The following files were modified by hand afterwards:
1 ash/launcher/launcher_button.cc
2 ash/system/audio/tray_volume.cc
3 ash/system/drive/tray_drive.cc
4 ash/system/tray/system_tray_delegate.h
5 ash/system/tray/tray_item_more.cc
6 ash/system/tray/tray_item_more.h
7 chrome/browser/chromeos/login/take_photo_view.cc
8 chrome/browser/chromeos/login/take_photo_view.h
9 chrome/browser/chromeos/options/network_config_view.cc
10 chrome/browser/chromeos/options/network_config_view.h
11 chrome/browser/ui/panels/panel_browser_frame_view.cc
12 chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc
13 chrome/browser/ui/views/autocomplete/autocomplete_result_view.h
14 chrome/browser/ui/views/avatar_menu_bubble_view.cc
15 chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc
16 chrome/browser/ui/views/confirm_bubble_view.cc
17 chrome/browser/ui/views/download/download_shelf_view.cc
18 chrome/browser/ui/views/download/download_started_animation_views.cc
19 chrome/browser/ui/views/dropdown_bar_view.cc
20 chrome/browser/ui/views/dropdown_bar_view.h
21 chrome/browser/ui/views/find_bar_view.cc
22 chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
23 chrome/browser/ui/views/hung_renderer_view.cc
24 chrome/browser/ui/views/location_bar/page_action_image_view.cc
25 chrome/browser/ui/views/tabs/tab_strip.cc
26 chrome/browser/ui/views/tabs/tab_strip.h
27 ui/views/controls/button/image_button.h
28 ui/views/controls/button/image_button_unittest.cc
29 ui/views/controls/scrollbar/bitmap_scroll_bar.cc
30 ui/views/controls/scrollbar/bitmap_scroll_bar.h
Whitespace changes were made in the following files manually
1 ash/launcher/launcher_view.cc
2 chrome/browser/chromeos/login/simple_web_view_dialog.cc
3 chrome/browser/ui/views/location_bar/chrome_to_mobile_view.cc
4 chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
5 chrome/browser/ui/views/toolbar_view.cc
Bug=124566
Test=Compiles, try bots pass
Review URL: https://chromiumcodereview.appspot.com/10382144
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136964 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
40 files changed, 135 insertions, 127 deletions
diff --git a/chrome/browser/ui/panels/panel_browser_frame_view.cc b/chrome/browser/ui/panels/panel_browser_frame_view.cc index 61489a8..6f181f6 100644 --- a/chrome/browser/ui/panels/panel_browser_frame_view.cc +++ b/chrome/browser/ui/panels/panel_browser_frame_view.cc @@ -110,16 +110,16 @@ const SkColor kBorderColor = 0xc0000000; const SkColor kDividerColor = 0xffb5b5b5; struct ButtonResources { - SkBitmap* normal_image; - SkBitmap* hover_image; + gfx::ImageSkia* normal_image; + gfx::ImageSkia* hover_image; string16 tooltip_text; ButtonResources(int normal_image_id, int hover_image_id, int tooltip_id) : normal_image(NULL), hover_image(NULL) { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - normal_image = rb.GetBitmapNamed(normal_image_id); - hover_image = rb.GetBitmapNamed(hover_image_id); + normal_image = rb.GetImageSkiaNamed(normal_image_id); + hover_image = rb.GetImageSkiaNamed(hover_image_id); tooltip_text = l10n_util::GetStringUTF16(tooltip_id); } }; diff --git a/chrome/browser/ui/tests/ui_gfx_image_unittest.cc b/chrome/browser/ui/tests/ui_gfx_image_unittest.cc index 6640a63..dedf6df 100644 --- a/chrome/browser/ui/tests/ui_gfx_image_unittest.cc +++ b/chrome/browser/ui/tests/ui_gfx_image_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -30,7 +30,7 @@ TEST(UiGfxImageTest, ViewsImageView) { container->SetVisible(true); scoped_ptr<views::ImageView> image_view(new views::ImageView()); - image_view->SetImage(*image.ToSkBitmap()); + image_view->SetImage(*image.ToImageSkia()); container->AddChildView(image_view.get()); } #endif diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc b/chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc index 14a0c03..ead319f 100644 --- a/chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc +++ b/chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc @@ -298,10 +298,10 @@ const SkBitmap* AutocompleteResultView::GetIcon() const { return ui::ResourceBundle::GetSharedInstance().GetBitmapNamed(icon); } -const SkBitmap* AutocompleteResultView::GetKeywordIcon() const { +const gfx::ImageSkia* AutocompleteResultView::GetKeywordIcon() const { // NOTE: If we ever begin returning icons of varying size, then callers need // to ensure that |keyword_icon_| is resized each time its image is reset. - return ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( + return ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( (GetState() == SELECTED) ? IDR_OMNIBOX_TTS_SELECTED : IDR_OMNIBOX_TTS); } @@ -632,4 +632,3 @@ void AutocompleteResultView::AnimationProgressed( Layout(); SchedulePaint(); } - diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_result_view.h b/chrome/browser/ui/views/autocomplete/autocomplete_result_view.h index 7d79dfd..bdaf700 100644 --- a/chrome/browser/ui/views/autocomplete/autocomplete_result_view.h +++ b/chrome/browser/ui/views/autocomplete/autocomplete_result_view.h @@ -94,7 +94,7 @@ class AutocompleteResultView : public views::View, ResultViewState GetState() const; const SkBitmap* GetIcon() const; - const SkBitmap* GetKeywordIcon() const; + const gfx::ImageSkia* GetKeywordIcon() const; // Elides |runs| to fit in |remaining_width|. The runs in |runs| should be in // logical order. diff --git a/chrome/browser/ui/views/avatar_menu_bubble_view.cc b/chrome/browser/ui/views/avatar_menu_bubble_view.cc index e23d3ee..fea4611 100644 --- a/chrome/browser/ui/views/avatar_menu_bubble_view.cc +++ b/chrome/browser/ui/views/avatar_menu_bubble_view.cc @@ -183,9 +183,9 @@ ProfileItemView::ProfileItemView(const AvatarMenuModel::Item& item, SkBitmap profile_icon = *item_.icon.ToSkBitmap(); if (item_.active) { SkBitmap badged_icon(GetBadgedIcon(profile_icon)); - image_view_->SetImage(&badged_icon); + image_view_->SetImage(badged_icon); } else { - image_view_->SetImage(&profile_icon); + image_view_->SetImage(profile_icon); } AddChildView(image_view_); diff --git a/chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc b/chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc index 918f7e6..a52d855 100644 --- a/chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc +++ b/chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc @@ -72,7 +72,8 @@ void CheckboxNativeThemeBorder::GetInsets(gfx::Insets* insets) const { void SetImageViewToId(views::View* image_view, int id) { views::ImageView* image = static_cast<views::ImageView*>(image_view); if (image) - image->SetImage(ui::ResourceBundle::GetSharedInstance().GetBitmapNamed(id)); + image->SetImage( + ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(id)); } } // namespace diff --git a/chrome/browser/ui/views/collected_cookies_views.cc b/chrome/browser/ui/views/collected_cookies_views.cc index 6b8722c..68dbdf5 100644 --- a/chrome/browser/ui/views/collected_cookies_views.cc +++ b/chrome/browser/ui/views/collected_cookies_views.cc @@ -85,7 +85,7 @@ class InfobarView : public views::View { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); info_image_ = new views::ImageView(); - info_image_->SetImage(rb.GetBitmapNamed(IDR_INFO)); + info_image_->SetImage(rb.GetImageSkiaNamed(IDR_INFO)); label_ = new views::Label(); } virtual ~InfobarView() {} diff --git a/chrome/browser/ui/views/confirm_bubble_view.cc b/chrome/browser/ui/views/confirm_bubble_view.cc index 59338b4..21655cb 100644 --- a/chrome/browser/ui/views/confirm_bubble_view.cc +++ b/chrome/browser/ui/views/confirm_bubble_view.cc @@ -80,7 +80,7 @@ void ConfirmBubbleView::Init() { gfx::Image* icon_image = model_->GetIcon(); DCHECK(icon_image); views::ImageView* icon_view = new views::ImageView; - icon_view->SetImage(icon_image->ToSkBitmap()); + icon_view->SetImage(icon_image->ToImageSkia()); layout->AddView(icon_view); const string16 title_text = model_->GetTitle(); @@ -90,8 +90,8 @@ void ConfirmBubbleView::Init() { layout->AddView(title_label); views::ImageButton* close_button = new views::ImageButton(this); - const SkBitmap* close_image = - bundle.GetImageNamed(IDR_INFO_BUBBLE_CLOSE).ToSkBitmap(); + const gfx::ImageSkia* close_image = + bundle.GetImageNamed(IDR_INFO_BUBBLE_CLOSE).ToImageSkia(); close_button->SetImage(views::CustomButton::BS_NORMAL, close_image); close_button->set_tag(ConfirmBubbleModel::BUTTON_NONE); layout->AddView(close_button); diff --git a/chrome/browser/ui/views/constrained_window_views.cc b/chrome/browser/ui/views/constrained_window_views.cc index d778383..53d479f 100644 --- a/chrome/browser/ui/views/constrained_window_views.cc +++ b/chrome/browser/ui/views/constrained_window_views.cc @@ -296,11 +296,11 @@ ConstrainedWindowFrameView::ConstrainedWindowFrameView( ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); close_button_->SetImage(views::CustomButton::BS_NORMAL, - rb.GetBitmapNamed(IDR_CLOSE_SA)); + rb.GetImageSkiaNamed(IDR_CLOSE_SA)); close_button_->SetImage(views::CustomButton::BS_HOT, - rb.GetBitmapNamed(IDR_CLOSE_SA_H)); + rb.GetImageSkiaNamed(IDR_CLOSE_SA_H)); close_button_->SetImage(views::CustomButton::BS_PUSHED, - rb.GetBitmapNamed(IDR_CLOSE_SA_P)); + rb.GetImageSkiaNamed(IDR_CLOSE_SA_P)); close_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER, views::ImageButton::ALIGN_MIDDLE); AddChildView(close_button_); diff --git a/chrome/browser/ui/views/create_application_shortcut_view.cc b/chrome/browser/ui/views/create_application_shortcut_view.cc index 14e16504..a627bc2 100644 --- a/chrome/browser/ui/views/create_application_shortcut_view.cc +++ b/chrome/browser/ui/views/create_application_shortcut_view.cc @@ -161,7 +161,7 @@ void AppInfoView::UpdateText(const string16& title, void AppInfoView::UpdateIcon(const gfx::Image& image) { if (!image.IsEmpty()) - icon_->SetImage(image.ToSkBitmap()); + icon_->SetImage(image.ToImageSkia()); } void AppInfoView::OnPaint(gfx::Canvas* canvas) { diff --git a/chrome/browser/ui/views/critical_notification_bubble_view.cc b/chrome/browser/ui/views/critical_notification_bubble_view.cc index ecf88f7..5020f6e 100644 --- a/chrome/browser/ui/views/critical_notification_bubble_view.cc +++ b/chrome/browser/ui/views/critical_notification_bubble_view.cc @@ -176,7 +176,7 @@ void CriticalNotificationBubbleView::Init() { layout->StartRow(0, top_column_set_id); views::ImageView* image = new views::ImageView(); - image->SetImage(rb.GetBitmapNamed(IDR_UPDATE_MENU3)); + image->SetImage(rb.GetImageSkiaNamed(IDR_UPDATE_MENU3)); layout->AddView(image); headline_ = new views::Label(); diff --git a/chrome/browser/ui/views/download/download_shelf_view.cc b/chrome/browser/ui/views/download/download_shelf_view.cc index 8660740..0d11adf9 100644 --- a/chrome/browser/ui/views/download/download_shelf_view.cc +++ b/chrome/browser/ui/views/download/download_shelf_view.cc @@ -307,7 +307,7 @@ void DownloadShelfView::ViewHierarchyChanged(bool is_add, ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); arrow_image_ = new views::ImageView(); - arrow_image_->SetImage(rb.GetBitmapNamed(IDR_DOWNLOADS_FAVICON)); + arrow_image_->SetImage(rb.GetImageSkiaNamed(IDR_DOWNLOADS_FAVICON)); AddChildView(arrow_image_); show_all_view_ = new views::Link( @@ -320,11 +320,11 @@ void DownloadShelfView::ViewHierarchyChanged(bool is_add, close_button_ = new views::ImageButton(this); close_button_->SetImage(views::CustomButton::BS_NORMAL, - rb.GetBitmapNamed(IDR_CLOSE_BAR)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR)); close_button_->SetImage(views::CustomButton::BS_HOT, - rb.GetBitmapNamed(IDR_CLOSE_BAR_H)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H)); close_button_->SetImage(views::CustomButton::BS_PUSHED, - rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P)); close_button_->SetAccessibleName( l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); UpdateButtonColors(); @@ -364,8 +364,8 @@ void DownloadShelfView::UpdateButtonColors() { if (GetThemeProvider()) { close_button_->SetBackground( GetThemeProvider()->GetColor(ThemeService::COLOR_TAB_TEXT), - rb.GetBitmapNamed(IDR_CLOSE_BAR), - rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR), + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_MASK)); } } diff --git a/chrome/browser/ui/views/download/download_started_animation_views.cc b/chrome/browser/ui/views/download/download_started_animation_views.cc index fd4d9c3..f711ca1 100644 --- a/chrome/browser/ui/views/download/download_started_animation_views.cc +++ b/chrome/browser/ui/views/download/download_started_animation_views.cc @@ -82,9 +82,9 @@ DownloadStartedAnimationWin::DownloadStartedAnimationWin( : ui::LinearAnimation(kMoveTimeMs, kFrameRateHz, NULL), popup_(NULL), web_contents_(web_contents) { - static SkBitmap* kDownloadImage = NULL; + static gfx::ImageSkia* kDownloadImage = NULL; if (!kDownloadImage) { - kDownloadImage = ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( + kDownloadImage = ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( IDR_DOWNLOAD_ANIMATION_BEGIN); } diff --git a/chrome/browser/ui/views/dropdown_bar_view.cc b/chrome/browser/ui/views/dropdown_bar_view.cc index dd91908..42e1f3b 100644 --- a/chrome/browser/ui/views/dropdown_bar_view.cc +++ b/chrome/browser/ui/views/dropdown_bar_view.cc @@ -13,6 +13,7 @@ #include "third_party/skia/include/core/SkRect.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/canvas.h" +#include "ui/gfx/image/image_skia.h" #include "ui/views/background.h" #include "ui/views/border.h" #include "ui/views/painter.h" @@ -29,8 +30,8 @@ const int kAnimatingEdgeHeight = 5; class DropdownBackground : public views::Background { public: explicit DropdownBackground(BrowserView* browser, - const SkBitmap* left_alpha_mask, - const SkBitmap* right_alpha_mask); + const gfx::ImageSkia* left_alpha_mask, + const gfx::ImageSkia* right_alpha_mask); virtual ~DropdownBackground() {} // Overridden from views::Background. @@ -38,15 +39,15 @@ class DropdownBackground : public views::Background { private: BrowserView* browser_view_; - const SkBitmap* left_alpha_mask_; - const SkBitmap* right_alpha_mask_; + const gfx::ImageSkia* left_alpha_mask_; + const gfx::ImageSkia* right_alpha_mask_; DISALLOW_COPY_AND_ASSIGN(DropdownBackground); }; DropdownBackground::DropdownBackground(BrowserView* browser_view, - const SkBitmap* left_alpha_mask, - const SkBitmap* right_alpha_mask) + const gfx::ImageSkia* left_alpha_mask, + const gfx::ImageSkia* right_alpha_mask) : browser_view_(browser_view), left_alpha_mask_(left_alpha_mask), right_alpha_mask_(right_alpha_mask) { @@ -122,8 +123,8 @@ void DropdownBarView::OnPaint(gfx::Canvas* canvas) { //////////////////////////////////////////////////////////////////////////////// // DropDownBarView, protected: -void DropdownBarView::SetBackground(const SkBitmap* left_alpha_mask, - const SkBitmap* right_alpha_mask) { +void DropdownBarView::SetBackground(const gfx::ImageSkia* left_alpha_mask, + const gfx::ImageSkia* right_alpha_mask) { set_background(new DropdownBackground(host()->browser_view(), left_alpha_mask, right_alpha_mask)); } diff --git a/chrome/browser/ui/views/dropdown_bar_view.h b/chrome/browser/ui/views/dropdown_bar_view.h index 635f0a6..a8b7c01 100644 --- a/chrome/browser/ui/views/dropdown_bar_view.h +++ b/chrome/browser/ui/views/dropdown_bar_view.h @@ -12,6 +12,7 @@ namespace gfx { class Canvas; +class ImageSkia; } // namespace gfx //////////////////////////////////////////////////////////////////////////////// @@ -40,8 +41,8 @@ class DropdownBarView : public views::AccessiblePaneView, // Returns the DropdownBarHost that manages this view. DropdownBarHost* host() const { return host_; } - void SetBackground(const SkBitmap* left_alpha_mask, - const SkBitmap* right_alpha_mask); + void SetBackground(const gfx::ImageSkia* left_alpha_mask, + const gfx::ImageSkia* right_alpha_mask); void SetBorder(int left_border_bitmap_id, int middle_border_bitmap_id, int right_border_bitmap_id); diff --git a/chrome/browser/ui/views/edit_search_engine_dialog.cc b/chrome/browser/ui/views/edit_search_engine_dialog.cc index d962008..6aeeeec 100644 --- a/chrome/browser/ui/views/edit_search_engine_dialog.cc +++ b/chrome/browser/ui/views/edit_search_engine_dialog.cc @@ -251,9 +251,9 @@ void EditSearchEngineDialog::UpdateImageView(ImageView* image_view, ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); if (is_valid) { image_view->SetTooltipText(string16()); - image_view->SetImage(rb.GetBitmapNamed(IDR_INPUT_GOOD)); + image_view->SetImage(rb.GetImageSkiaNamed(IDR_INPUT_GOOD)); } else { image_view->SetTooltipText(l10n_util::GetStringUTF16(invalid_message_id)); - image_view->SetImage(rb.GetBitmapNamed(IDR_INPUT_ALERT)); + image_view->SetImage(rb.GetImageSkiaNamed(IDR_INPUT_ALERT)); } } diff --git a/chrome/browser/ui/views/extensions/bundle_installed_bubble.cc b/chrome/browser/ui/views/extensions/bundle_installed_bubble.cc index 49f8bf4..6aa7d9e 100644 --- a/chrome/browser/ui/views/extensions/bundle_installed_bubble.cc +++ b/chrome/browser/ui/views/extensions/bundle_installed_bubble.cc @@ -130,11 +130,11 @@ class BundleInstalledBubble : public views::BubbleDelegateView, views::ImageButton* button = new views::ImageButton(listener); button->SetImage(views::CustomButton::BS_NORMAL, - rb.GetBitmapNamed(IDR_CLOSE_BAR)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR)); button->SetImage(views::CustomButton::BS_HOT, - rb.GetBitmapNamed(IDR_CLOSE_BAR_H)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H)); button->SetImage(views::CustomButton::BS_PUSHED, - rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P)); layout->AddView(button); } diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc index 8b767db..d20b36c 100644 --- a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc +++ b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc @@ -225,11 +225,11 @@ class InstalledBubbleContent : public views::View, close_button_ = new views::ImageButton(this); close_button_->SetImage(views::CustomButton::BS_NORMAL, - rb.GetBitmapNamed(IDR_CLOSE_BAR)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR)); close_button_->SetImage(views::CustomButton::BS_HOT, - rb.GetBitmapNamed(IDR_CLOSE_BAR_H)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H)); close_button_->SetImage(views::CustomButton::BS_PUSHED, - rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P)); AddChildView(close_button_); } diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc index 8b9b97a..34695e0 100644 --- a/chrome/browser/ui/views/find_bar_view.cc +++ b/chrome/browser/ui/views/find_bar_view.cc @@ -100,11 +100,11 @@ FindBarView::FindBarView(FindBarHost* host) find_previous_button_->set_tag(FIND_PREVIOUS_TAG); find_previous_button_->set_focusable(true); find_previous_button_->SetImage(views::CustomButton::BS_NORMAL, - rb.GetBitmapNamed(IDR_FINDINPAGE_PREV)); + rb.GetImageSkiaNamed(IDR_FINDINPAGE_PREV)); find_previous_button_->SetImage(views::CustomButton::BS_HOT, - rb.GetBitmapNamed(IDR_FINDINPAGE_PREV_H)); + rb.GetImageSkiaNamed(IDR_FINDINPAGE_PREV_H)); find_previous_button_->SetImage(views::CustomButton::BS_DISABLED, - rb.GetBitmapNamed(IDR_FINDINPAGE_PREV_P)); + rb.GetImageSkiaNamed(IDR_FINDINPAGE_PREV_P)); find_previous_button_->SetTooltipText( l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_PREVIOUS_TOOLTIP)); find_previous_button_->SetAccessibleName( @@ -115,11 +115,11 @@ FindBarView::FindBarView(FindBarHost* host) find_next_button_->set_tag(FIND_NEXT_TAG); find_next_button_->set_focusable(true); find_next_button_->SetImage(views::CustomButton::BS_NORMAL, - rb.GetBitmapNamed(IDR_FINDINPAGE_NEXT)); + rb.GetImageSkiaNamed(IDR_FINDINPAGE_NEXT)); find_next_button_->SetImage(views::CustomButton::BS_HOT, - rb.GetBitmapNamed(IDR_FINDINPAGE_NEXT_H)); + rb.GetImageSkiaNamed(IDR_FINDINPAGE_NEXT_H)); find_next_button_->SetImage(views::CustomButton::BS_DISABLED, - rb.GetBitmapNamed(IDR_FINDINPAGE_NEXT_P)); + rb.GetImageSkiaNamed(IDR_FINDINPAGE_NEXT_P)); find_next_button_->SetTooltipText( l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_NEXT_TOOLTIP)); find_next_button_->SetAccessibleName( @@ -130,19 +130,19 @@ FindBarView::FindBarView(FindBarHost* host) close_button_->set_tag(CLOSE_TAG); close_button_->set_focusable(true); close_button_->SetImage(views::CustomButton::BS_NORMAL, - rb.GetBitmapNamed(IDR_CLOSE_BAR)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR)); close_button_->SetImage(views::CustomButton::BS_HOT, - rb.GetBitmapNamed(IDR_CLOSE_BAR_H)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H)); close_button_->SetImage(views::CustomButton::BS_PUSHED, - rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P)); close_button_->SetTooltipText( l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_CLOSE_TOOLTIP)); close_button_->SetAccessibleName( l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); AddChildView(close_button_); - SetBackground(rb.GetBitmapNamed(IDR_FIND_DLG_LEFT_BACKGROUND), - rb.GetBitmapNamed(IDR_FIND_DLG_RIGHT_BACKGROUND)); + SetBackground(rb.GetImageSkiaNamed(IDR_FIND_DLG_LEFT_BACKGROUND), + rb.GetImageSkiaNamed(IDR_FIND_DLG_RIGHT_BACKGROUND)); SetBorder(IDR_FIND_DIALOG_LEFT, IDR_FIND_DIALOG_MIDDLE, IDR_FIND_DIALOG_RIGHT); @@ -489,7 +489,7 @@ void FindBarView::OnThemeChanged() { if (GetThemeProvider()) { close_button_->SetBackground( GetThemeProvider()->GetColor(ThemeService::COLOR_TAB_TEXT), - rb.GetBitmapNamed(IDR_CLOSE_BAR), - rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR), + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_MASK)); } } diff --git a/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc b/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc index db807d5..c0be976 100644 --- a/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc +++ b/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc @@ -132,11 +132,11 @@ class AppNonClientFrameViewAura::ControlView int hot_bitmap_id, int pushed_bitmap_id) { ui::ThemeProvider* theme_provider = GetThemeProvider(); button->SetImage(views::CustomButton::BS_NORMAL, - theme_provider->GetBitmapNamed(normal_bitmap_id)); + theme_provider->GetImageSkiaNamed(normal_bitmap_id)); button->SetImage(views::CustomButton::BS_HOT, - theme_provider->GetBitmapNamed(hot_bitmap_id)); + theme_provider->GetImageSkiaNamed(hot_bitmap_id)); button->SetImage(views::CustomButton::BS_PUSHED, - theme_provider->GetBitmapNamed(pushed_bitmap_id)); + theme_provider->GetImageSkiaNamed(pushed_bitmap_id)); } AppNonClientFrameViewAura* owner_; diff --git a/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc b/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc index 75c42c1..e117d1b 100644 --- a/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc +++ b/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc @@ -73,11 +73,11 @@ AppPanelBrowserFrameView::AppPanelBrowserFrameView(BrowserFrame* frame, ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); close_button_->SetImage(views::CustomButton::BS_NORMAL, - rb.GetBitmapNamed(IDR_CLOSE_BAR)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR)); close_button_->SetImage(views::CustomButton::BS_HOT, - rb.GetBitmapNamed(IDR_CLOSE_BAR_H)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H)); close_button_->SetImage(views::CustomButton::BS_PUSHED, - rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P)); close_button_->SetAccessibleName( l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); AddChildView(close_button_); diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc index f4d82c8..df884f0 100644 --- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc +++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc @@ -463,16 +463,16 @@ views::ImageButton* OpaqueBrowserFrameView::InitWindowCaptionButton( views::ImageButton* button = new views::ImageButton(this); ui::ThemeProvider* tp = frame()->GetThemeProvider(); button->SetImage(views::CustomButton::BS_NORMAL, - tp->GetBitmapNamed(normal_bitmap_id)); + tp->GetImageSkiaNamed(normal_bitmap_id)); button->SetImage(views::CustomButton::BS_HOT, - tp->GetBitmapNamed(hot_bitmap_id)); + tp->GetImageSkiaNamed(hot_bitmap_id)); button->SetImage(views::CustomButton::BS_PUSHED, - tp->GetBitmapNamed(pushed_bitmap_id)); + tp->GetImageSkiaNamed(pushed_bitmap_id)); if (browser_view()->IsBrowserTypeNormal()) { button->SetBackground( tp->GetColor(ThemeService::COLOR_BUTTON_BACKGROUND), - tp->GetBitmapNamed(IDR_THEME_WINDOW_CONTROL_BACKGROUND), - tp->GetBitmapNamed(mask_bitmap_id)); + tp->GetImageSkiaNamed(IDR_THEME_WINDOW_CONTROL_BACKGROUND), + tp->GetImageSkiaNamed(mask_bitmap_id)); } button->SetAccessibleName( l10n_util::GetStringUTF16(accessibility_string_id)); diff --git a/chrome/browser/ui/views/global_error_bubble_view.cc b/chrome/browser/ui/views/global_error_bubble_view.cc index 4733035..4d3044e 100644 --- a/chrome/browser/ui/views/global_error_bubble_view.cc +++ b/chrome/browser/ui/views/global_error_bubble_view.cc @@ -69,7 +69,7 @@ GlobalErrorBubbleView::GlobalErrorBubbleView( ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); int resource_id = error_->GetBubbleViewIconResourceID(); scoped_ptr<views::ImageView> image_view(new views::ImageView()); - image_view->SetImage(rb.GetImageNamed(resource_id).ToSkBitmap()); + image_view->SetImage(rb.GetImageNamed(resource_id).ToImageSkia()); string16 title_string(error_->GetBubbleViewTitle()); scoped_ptr<views::Label> title_label(new views::Label(title_string)); diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc index a3d6b4b..bcd3e91 100644 --- a/chrome/browser/ui/views/hung_renderer_view.cc +++ b/chrome/browser/ui/views/hung_renderer_view.cc @@ -300,13 +300,13 @@ class HungRendererDialogView : public views::DialogDelegateView, bool initialized_; // An amusing icon image. - static SkBitmap* frozen_icon_; + static gfx::ImageSkia* frozen_icon_; DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); }; // static -SkBitmap* HungRendererDialogView::frozen_icon_ = NULL; +gfx::ImageSkia* HungRendererDialogView::frozen_icon_ = NULL; // The distance in pixels from the top of the relevant contents to place the // warning window. @@ -556,7 +556,7 @@ void HungRendererDialogView::InitClass() { static bool initialized = false; if (!initialized) { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - frozen_icon_ = rb.GetBitmapNamed(IDR_FROZEN_TAB_ICON); + frozen_icon_ = rb.GetImageSkiaNamed(IDR_FROZEN_TAB_ICON); initialized = true; } } diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc index c22de3b..9b7b9fe 100644 --- a/chrome/browser/ui/views/infobars/infobar_view.cc +++ b/chrome/browser/ui/views/infobars/infobar_view.cc @@ -218,18 +218,18 @@ void InfoBarView::ViewHierarchyChanged(bool is_add, View* parent, View* child) { gfx::Image* image = delegate()->GetIcon(); if (image) { icon_ = new views::ImageView; - icon_->SetImage(image->ToSkBitmap()); + icon_->SetImage(image->ToImageSkia()); AddChildView(icon_); } close_button_ = new views::ImageButton(this); ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); close_button_->SetImage(views::CustomButton::BS_NORMAL, - rb.GetImageNamed(IDR_CLOSE_BAR).ToSkBitmap()); + rb.GetImageNamed(IDR_CLOSE_BAR).ToImageSkia()); close_button_->SetImage(views::CustomButton::BS_HOT, - rb.GetImageNamed(IDR_CLOSE_BAR_H).ToSkBitmap()); + rb.GetImageNamed(IDR_CLOSE_BAR_H).ToImageSkia()); close_button_->SetImage(views::CustomButton::BS_PUSHED, - rb.GetImageNamed(IDR_CLOSE_BAR_P).ToSkBitmap()); + rb.GetImageNamed(IDR_CLOSE_BAR_P).ToImageSkia()); close_button_->SetAccessibleName( l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); close_button_->set_focusable(true); diff --git a/chrome/browser/ui/views/location_bar/chrome_to_mobile_view.cc b/chrome/browser/ui/views/location_bar/chrome_to_mobile_view.cc index 5c6c0c7..0e8d991 100644 --- a/chrome/browser/ui/views/location_bar/chrome_to_mobile_view.cc +++ b/chrome/browser/ui/views/location_bar/chrome_to_mobile_view.cc @@ -22,7 +22,8 @@ ChromeToMobileView::ChromeToMobileView( command_updater_(command_updater) { set_id(VIEW_ID_CHROME_TO_MOBILE_BUTTON); set_accessibility_focusable(true); - SetImage(ui::ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_MOBILE)); + SetImage( + ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(IDR_MOBILE)); SetTooltipText( l10n_util::GetStringUTF16(IDS_CHROME_TO_MOBILE_BUBBLE_TOOLTIP)); SetVisible(command_updater_->IsCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE)); diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc index c207f5f..c9d315e 100644 --- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc +++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc @@ -73,7 +73,7 @@ void ContentSettingImageView::UpdateFromWebContents(WebContents* web_contents) { SetVisible(false); return; } - SetImage(ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( + SetImage(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( content_setting_image_model_->get_icon())); SetTooltipText(UTF8ToUTF16(content_setting_image_model_->get_tooltip())); SetVisible(true); diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc index 04fd098..19e405f 100644 --- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc +++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc @@ -26,7 +26,8 @@ IconLabelBubbleView::IconLabelBubbleView(const int background_images[], is_extension_icon_(false) { image_ = new views::ImageView(); image_->SetImage( - ui::ResourceBundle::GetSharedInstance().GetBitmapNamed(contained_image)); + ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( + contained_image)); AddChildView(image_); label_ = new views::Label(); diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc index 75760df..ca9c652 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc @@ -602,7 +602,7 @@ void LocationBarView::Layout() { } else { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); selected_keyword_view_->SetImage( - *rb.GetBitmapNamed(IDR_OMNIBOX_SEARCH)); + *rb.GetImageSkiaNamed(IDR_OMNIBOX_SEARCH)); selected_keyword_view_->set_is_extension_icon(false); } } @@ -873,7 +873,7 @@ void LocationBarView::OnAutocompleteAccept( void LocationBarView::OnChanged() { location_icon_view_->SetImage( - ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( + ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( location_entry_->GetIcon())); location_icon_view_->ShowTooltip(!GetLocationEntry()->IsEditingOrEmpty()); diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.cc b/chrome/browser/ui/views/location_bar/page_action_image_view.cc index 5877e02..a7bcf21a 100644 --- a/chrome/browser/ui/views/location_bar/page_action_image_view.cc +++ b/chrome/browser/ui/views/location_bar/page_action_image_view.cc @@ -256,7 +256,7 @@ void PageActionImageView::UpdateVisibility(WebContents* contents, } } if (!icon.isNull()) - SetImage(&icon); + SetImage(icon); SetVisible(true); } diff --git a/chrome/browser/ui/views/location_bar/star_view.cc b/chrome/browser/ui/views/location_bar/star_view.cc index 98a2d2c..42c09eb 100644 --- a/chrome/browser/ui/views/location_bar/star_view.cc +++ b/chrome/browser/ui/views/location_bar/star_view.cc @@ -29,7 +29,7 @@ StarView::~StarView() { void StarView::SetToggled(bool on) { SetTooltipText(l10n_util::GetStringUTF16( on ? IDS_TOOLTIP_STARRED : IDS_TOOLTIP_STAR)); - SetImage(ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( + SetImage(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( on ? IDR_STAR_LIT : IDR_STAR)); } diff --git a/chrome/browser/ui/views/notifications/balloon_view.cc b/chrome/browser/ui/views/notifications/balloon_view.cc index 1b3e838..9644487 100644 --- a/chrome/browser/ui/views/notifications/balloon_view.cc +++ b/chrome/browser/ui/views/notifications/balloon_view.cc @@ -380,15 +380,15 @@ void BalloonViewImpl::Show(Balloon* balloon) { frame_container_->SetAlwaysOnTop(true); close_button_->SetImage(views::CustomButton::BS_NORMAL, - rb.GetBitmapNamed(IDR_TAB_CLOSE)); + rb.GetImageSkiaNamed(IDR_TAB_CLOSE)); close_button_->SetImage(views::CustomButton::BS_HOT, - rb.GetBitmapNamed(IDR_TAB_CLOSE_H)); + rb.GetImageSkiaNamed(IDR_TAB_CLOSE_H)); close_button_->SetImage(views::CustomButton::BS_PUSHED, - rb.GetBitmapNamed(IDR_TAB_CLOSE_P)); + rb.GetImageSkiaNamed(IDR_TAB_CLOSE_P)); close_button_->SetBoundsRect(GetCloseButtonBounds()); close_button_->SetBackground(SK_ColorBLACK, - rb.GetBitmapNamed(IDR_TAB_CLOSE), - rb.GetBitmapNamed(IDR_TAB_CLOSE_MASK)); + rb.GetImageSkiaNamed(IDR_TAB_CLOSE), + rb.GetImageSkiaNamed(IDR_TAB_CLOSE_MASK)); options_menu_button_->SetIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH)); options_menu_button_->SetHoverIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH_H)); diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc index 566cf9b..3ba3f04 100644 --- a/chrome/browser/ui/views/sad_tab_view.cc +++ b/chrome/browser/ui/views/sad_tab_view.cc @@ -155,7 +155,7 @@ void SadTabView::ViewHierarchyChanged(bool is_add, columns->AddPaddingColumn(1, kPadding); views::ImageView* image = new views::ImageView(); - image->SetImage(ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( + image->SetImage(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( (kind_ == CRASHED) ? IDR_SAD_TAB : IDR_KILLED_TAB)); layout->StartRowWithPadding(0, column_set_id, 1, kPadding); layout->AddView(image); diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc index ab79d0e..63d2965 100644 --- a/chrome/browser/ui/views/tabs/base_tab.cc +++ b/chrome/browser/ui/views/tabs/base_tab.cc @@ -160,11 +160,11 @@ BaseTab::BaseTab(TabController* controller) close_button_ = new TabCloseButton(this); ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); close_button_->SetImage(views::CustomButton::BS_NORMAL, - rb.GetBitmapNamed(IDR_TAB_CLOSE)); + rb.GetImageSkiaNamed(IDR_TAB_CLOSE)); close_button_->SetImage(views::CustomButton::BS_HOT, - rb.GetBitmapNamed(IDR_TAB_CLOSE_H)); + rb.GetImageSkiaNamed(IDR_TAB_CLOSE_H)); close_button_->SetImage(views::CustomButton::BS_PUSHED, - rb.GetBitmapNamed(IDR_TAB_CLOSE_P)); + rb.GetImageSkiaNamed(IDR_TAB_CLOSE_P)); close_button_->SetAccessibleName( l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); // Disable animation so that the red danger sign shows up immediately diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc index 06172b8..2a2184e 100644 --- a/chrome/browser/ui/views/tabs/tab.cc +++ b/chrome/browser/ui/views/tabs/tab.cc @@ -326,8 +326,8 @@ void Tab::OnPaint(gfx::Canvas* canvas) { close_button_color_ = title_color; ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); close_button()->SetBackground(close_button_color_, - rb.GetBitmapNamed(IDR_TAB_CLOSE), - rb.GetBitmapNamed(IDR_TAB_CLOSE_MASK)); + rb.GetImageSkiaNamed(IDR_TAB_CLOSE), + rb.GetImageSkiaNamed(IDR_TAB_CLOSE_MASK)); } } diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc index 6b5e392..284c259 100644 --- a/chrome/browser/ui/views/tabs/tab_strip.cc +++ b/chrome/browser/ui/views/tabs/tab_strip.cc @@ -1226,7 +1226,7 @@ void TabStrip::Init() { AddChildView(newtab_button_); if (drop_indicator_width == 0) { // Direction doesn't matter, both images are the same size. - SkBitmap* drop_image = GetDropArrowImage(true); + gfx::ImageSkia* drop_image = GetDropArrowImage(true); drop_indicator_width = drop_image->width(); drop_indicator_height = drop_image->height(); } @@ -1804,8 +1804,8 @@ int TabStrip::GetDropEffect(const views::DropTargetEvent& event) { } // static -SkBitmap* TabStrip::GetDropArrowImage(bool is_down) { - return ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( +gfx::ImageSkia* TabStrip::GetDropArrowImage(bool is_down) { + return ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( is_down ? IDR_TAB_DROP_DOWN : IDR_TAB_DROP_UP); } diff --git a/chrome/browser/ui/views/tabs/tab_strip.h b/chrome/browser/ui/views/tabs/tab_strip.h index 6ebe33f..bd22a4e 100644 --- a/chrome/browser/ui/views/tabs/tab_strip.h +++ b/chrome/browser/ui/views/tabs/tab_strip.h @@ -392,7 +392,7 @@ class TabStrip : public views::View, // Returns the image to use for indicating a drop on a tab. If is_down is // true, this returns an arrow pointing down. - static SkBitmap* GetDropArrowImage(bool is_down); + static gfx::ImageSkia* GetDropArrowImage(bool is_down); // -- Animations ------------------------------------------------------------ diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc index bdc2fe0..464db9f 100644 --- a/chrome/browser/ui/views/toolbar_view.cc +++ b/chrome/browser/ui/views/toolbar_view.cc @@ -748,41 +748,45 @@ int ToolbarView::PopupTopSpacing() const { void ToolbarView::LoadImages() { ui::ThemeProvider* tp = GetThemeProvider(); - back_->SetImage(views::CustomButton::BS_NORMAL, tp->GetBitmapNamed(IDR_BACK)); - back_->SetImage(views::CustomButton::BS_HOT, tp->GetBitmapNamed(IDR_BACK_H)); + back_->SetImage(views::CustomButton::BS_NORMAL, + tp->GetImageSkiaNamed(IDR_BACK)); + back_->SetImage(views::CustomButton::BS_HOT, + tp->GetImageSkiaNamed(IDR_BACK_H)); back_->SetImage(views::CustomButton::BS_PUSHED, - tp->GetBitmapNamed(IDR_BACK_P)); + tp->GetImageSkiaNamed(IDR_BACK_P)); back_->SetImage(views::CustomButton::BS_DISABLED, - tp->GetBitmapNamed(IDR_BACK_D)); + tp->GetImageSkiaNamed(IDR_BACK_D)); forward_->SetImage(views::CustomButton::BS_NORMAL, - tp->GetBitmapNamed(IDR_FORWARD)); + tp->GetImageSkiaNamed(IDR_FORWARD)); forward_->SetImage(views::CustomButton::BS_HOT, - tp->GetBitmapNamed(IDR_FORWARD_H)); + tp->GetImageSkiaNamed(IDR_FORWARD_H)); forward_->SetImage(views::CustomButton::BS_PUSHED, - tp->GetBitmapNamed(IDR_FORWARD_P)); + tp->GetImageSkiaNamed(IDR_FORWARD_P)); forward_->SetImage(views::CustomButton::BS_DISABLED, - tp->GetBitmapNamed(IDR_FORWARD_D)); + tp->GetImageSkiaNamed(IDR_FORWARD_D)); reload_->SetImage(views::CustomButton::BS_NORMAL, - tp->GetBitmapNamed(IDR_RELOAD)); + tp->GetImageSkiaNamed(IDR_RELOAD)); reload_->SetImage(views::CustomButton::BS_HOT, - tp->GetBitmapNamed(IDR_RELOAD_H)); + tp->GetImageSkiaNamed(IDR_RELOAD_H)); reload_->SetImage(views::CustomButton::BS_PUSHED, - tp->GetBitmapNamed(IDR_RELOAD_P)); + tp->GetImageSkiaNamed(IDR_RELOAD_P)); reload_->SetToggledImage(views::CustomButton::BS_NORMAL, - tp->GetBitmapNamed(IDR_STOP)); + tp->GetImageSkiaNamed(IDR_STOP)); reload_->SetToggledImage(views::CustomButton::BS_HOT, - tp->GetBitmapNamed(IDR_STOP_H)); + tp->GetImageSkiaNamed(IDR_STOP_H)); reload_->SetToggledImage(views::CustomButton::BS_PUSHED, - tp->GetBitmapNamed(IDR_STOP_P)); + tp->GetImageSkiaNamed(IDR_STOP_P)); reload_->SetToggledImage(views::CustomButton::BS_DISABLED, - tp->GetBitmapNamed(IDR_STOP_D)); + tp->GetImageSkiaNamed(IDR_STOP_D)); - home_->SetImage(views::CustomButton::BS_NORMAL, tp->GetBitmapNamed(IDR_HOME)); - home_->SetImage(views::CustomButton::BS_HOT, tp->GetBitmapNamed(IDR_HOME_H)); + home_->SetImage(views::CustomButton::BS_NORMAL, + tp->GetImageSkiaNamed(IDR_HOME)); + home_->SetImage(views::CustomButton::BS_HOT, + tp->GetImageSkiaNamed(IDR_HOME_H)); home_->SetImage(views::CustomButton::BS_PUSHED, - tp->GetBitmapNamed(IDR_HOME_P)); + tp->GetImageSkiaNamed(IDR_HOME_P)); app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); diff --git a/chrome/browser/ui/views/web_intent_picker_views.cc b/chrome/browser/ui/views/web_intent_picker_views.cc index 3ce1a08..ede5873 100644 --- a/chrome/browser/ui/views/web_intent_picker_views.cc +++ b/chrome/browser/ui/views/web_intent_picker_views.cc @@ -114,7 +114,7 @@ StarsView::StarsView(double rating) for (int i = 0; i < 5; ++i) { views::ImageView* image = new views::ImageView(); - image->SetImage(rb.GetBitmapNamed( + image->SetImage(rb.GetImageSkiaNamed( WebIntentPicker::GetNthStarImageIdFromCWSRating(rating, i))); AddChildView(image); } @@ -504,7 +504,7 @@ SuggestedExtensionsRowView::SuggestedExtensionsRowView( SetLayoutManager(new SuggestedExtensionsLayout); icon_ = new views::ImageView(); - icon_->SetImage(extension_->icon.ToSkBitmap()); + icon_->SetImage(extension_->icon.ToImageSkia()); AddChildView(icon_); string16 elided_title = ui::ElideText( @@ -924,7 +924,7 @@ void WebIntentPickerViews::OnInlineDispositionWebContentsLoaded( // Header row. grid_layout->StartRow(0, 0); views::ImageView* icon = new views::ImageView(); - icon->SetImage(service->favicon.ToSkBitmap()); + icon->SetImage(service->favicon.ToImageSkia()); grid_layout->AddView(icon); string16 elided_title = ui::ElideText( @@ -1158,11 +1158,11 @@ views::ImageButton* WebIntentPickerViews::CreateCloseButton() { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); views::ImageButton* close_button = new views::ImageButton(this); close_button->SetImage(views::CustomButton::BS_NORMAL, - rb.GetBitmapNamed(IDR_CLOSE_BAR)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR)); close_button->SetImage(views::CustomButton::BS_HOT, - rb.GetBitmapNamed(IDR_CLOSE_BAR_H)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H)); close_button->SetImage(views::CustomButton::BS_PUSHED, - rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P)); return close_button; } #endif diff --git a/chrome/browser/ui/views/wrench_menu.cc b/chrome/browser/ui/views/wrench_menu.cc index 753e80f..0541196 100644 --- a/chrome/browser/ui/views/wrench_menu.cc +++ b/chrome/browser/ui/views/wrench_menu.cc @@ -426,7 +426,7 @@ class WrenchMenu::ZoomView : public WrenchMenuView, fullscreen_button_ = new FullscreenButton(this); fullscreen_button_->SetImage( ImageButton::BS_NORMAL, - ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( + ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( IDR_FULLSCREEN_MENU_BUTTON)); fullscreen_button_->set_focusable(true); fullscreen_button_->set_request_focus_on_press(false); |