0

Pass ImageModel to ImageView::SetImage() in ash

The ImageSkia version of ImageView::SetImage() is deprecated.
There's no intended behavior changes with this patch.

This CL was uploaded by git cl split.

R=blundell@chromium.org

Bug: 40137576
Change-Id: I8e32966b7a0758ec2cd759d7669b71d276627664
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6171930
Auto-Submit: SangWoo Ko <sangwoo108@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1405392}
This commit is contained in:
sangwoo ko
2025-01-13 00:32:12 -08:00
committed by Chromium LUCI CQ
parent abadf0a477
commit d4afde24e4
2 changed files with 3 additions and 3 deletions

@ -263,8 +263,8 @@ void AnnotationTray::SetTrayEnabled(bool enabled) {
SkColorSetA(AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kIconColorPrimary),
0x4D);
image_view_->SetImage(gfx::CreateVectorIcon(kPaletteTrayIconProjectorIcon,
disabled_icon_color));
image_view_->SetImage(ui::ImageModel::FromVectorIcon(
kPaletteTrayIconProjectorIcon, disabled_icon_color));
image_view_->SetTooltipText(l10n_util::GetStringUTF16(
IDS_ASH_STATUS_AREA_PROJECTOR_ANNOTATION_TRAY_UNAVAILABLE));
}

@ -317,7 +317,7 @@ void DragDropController::SetDragImage(const gfx::ImageSkia& image,
DragImageView* drag_image =
static_cast<DragImageView*>(drag_image_widget_->GetContentsView());
drag_image->SetImage(image);
drag_image->SetImage(ui::ImageModel::FromImageSkia(image));
drag_image_offset_ = image_offset;
gfx::Rect drag_image_bounds(current_location_,
drag_image->GetPreferredSize());