summaryrefslogtreecommitdiffstats
path: root/ash/launcher
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-14 20:22:01 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-14 20:22:01 +0000
commit6c158192e64a230aa18f2ba4dd647d5b1a5a8b1d (patch)
tree34957fa50c8682e7e2bec16321ff34a2c6aa16aa /ash/launcher
parentfe7d500a0d9a42d358f5f1ca24d4770d9bb3b6cd (diff)
downloadchromium_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 'ash/launcher')
-rw-r--r--ash/launcher/launcher_button.cc4
-rw-r--r--ash/launcher/launcher_view.cc16
2 files changed, 11 insertions, 9 deletions
diff --git a/ash/launcher/launcher_button.cc b/ash/launcher/launcher_button.cc
index 8701f30..acc6a31 100644
--- a/ash/launcher/launcher_button.cc
+++ b/ash/launcher/launcher_button.cc
@@ -109,7 +109,7 @@ void LauncherButton::SetShadowedImage(const SkBitmap& bitmap) {
void LauncherButton::SetImage(const SkBitmap& image) {
if (image.empty()) {
// TODO: need an empty image.
- icon_view_->SetImage(&image);
+ icon_view_->SetImage(image);
return;
}
@@ -264,7 +264,7 @@ void LauncherButton::UpdateState() {
else
bar_id = IDR_AURA_LAUNCHER_UNDERLINE_RUNNING;
- bar_->SetImage(rb.GetImageNamed(bar_id).ToSkBitmap());
+ bar_->SetImage(rb.GetImageNamed(bar_id).ToImageSkia());
}
Layout();
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc
index 90d9be9..16bd424 100644
--- a/ash/launcher/launcher_view.cc
+++ b/ash/launcher/launcher_view.cc
@@ -276,13 +276,13 @@ void LauncherView::Init() {
overflow_button_->set_accessibility_focusable(true);
overflow_button_->SetImage(
views::CustomButton::BS_NORMAL,
- rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW).ToSkBitmap());
+ rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW).ToImageSkia());
overflow_button_->SetImage(
views::CustomButton::BS_HOT,
- rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_HOT).ToSkBitmap());
+ rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_HOT).ToImageSkia());
overflow_button_->SetImage(
views::CustomButton::BS_PUSHED,
- rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_PUSHED).ToSkBitmap());
+ rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_PUSHED).ToImageSkia());
overflow_button_->SetAccessibleName(
l10n_util::GetStringUTF16(IDS_AURA_LAUNCHER_OVERFLOW_NAME));
overflow_button_->set_context_menu_controller(this);
@@ -466,13 +466,15 @@ views::View* LauncherView::CreateViewForItem(const LauncherItem& item) {
views::ImageButton* button = new views::ImageButton(this);
button->SetImage(
views::CustomButton::BS_NORMAL,
- rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST).ToSkBitmap());
+ rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST).ToImageSkia());
button->SetImage(
views::CustomButton::BS_HOT,
- rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_HOT).ToSkBitmap());
+ rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_HOT).
+ ToImageSkia());
button->SetImage(
views::CustomButton::BS_PUSHED,
- rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_PUSHED).ToSkBitmap());
+ rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_PUSHED).
+ ToImageSkia());
button->SetAccessibleName(
l10n_util::GetStringUTF16(IDS_AURA_APP_LIST_TITLE));
button->SetTooltipText(
@@ -487,7 +489,7 @@ views::View* LauncherView::CreateViewForItem(const LauncherItem& item) {
int image_id = delegate_ ?
delegate_->GetBrowserShortcutResourceId() :
IDR_AURA_LAUNCHER_BROWSER_SHORTCUT;
- button->SetImage(*rb.GetImageNamed(image_id).ToSkBitmap());
+ button->SetImage(*rb.GetImageNamed(image_id).ToImageSkia());
view = button;
break;
}