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

Unified Diff: ash/system/tray/tray_image_item.cc

Issue 2846883006: cros: Update rotation lock UI (Closed)
Patch Set: cleanup tests Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/tray_image_item.h ('k') | testing/buildbot/filters/ash_mus_unittests.filter » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_image_item.cc
diff --git a/ash/system/tray/tray_image_item.cc b/ash/system/tray/tray_image_item.cc
index ca45de2fc8685bfe1dd0e0186dcfa627bee11b28..8d4b4e9dfa2c1b8842ecc53adfe7ecea5569f0db 100644
--- a/ash/system/tray/tray_image_item.cc
+++ b/ash/system/tray/tray_image_item.cc
@@ -34,7 +34,7 @@ views::View* TrayImageItem::CreateTrayView(LoginStatus status) {
CHECK(!tray_view_);
tray_view_ = new TrayItemView(this);
tray_view_->CreateImageView();
- UpdateImageOnImageView();
+ SetImageIcon(icon_);
tray_view_->SetVisible(GetInitialVisibility());
return tray_view_;
}
@@ -45,15 +45,15 @@ void TrayImageItem::DestroyTrayView() {
void TrayImageItem::SetIconColor(SkColor color) {
icon_color_ = color;
- UpdateImageOnImageView();
+ SetImageIcon(icon_);
}
-void TrayImageItem::UpdateImageOnImageView() {
+void TrayImageItem::SetImageIcon(const gfx::VectorIcon& icon) {
if (!tray_view_)
return;
tray_view_->image_view()->SetImage(
- gfx::CreateVectorIcon(icon_, kTrayIconSize, icon_color_));
+ gfx::CreateVectorIcon(icon, kTrayIconSize, icon_color_));
}
} // namespace ash
« no previous file with comments | « ash/system/tray/tray_image_item.h ('k') | testing/buildbot/filters/ash_mus_unittests.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698