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

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

Issue 2859663003: [merge to M59] cros: Update rotation lock UI (Closed)
Patch Set: 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 bc90194abb54f60411c8bd2d109ec86f2080748d..c7ba8ef6c6fd4e30c7e6c95577af7fcb9f3203f3 100644
--- a/ash/system/tray/tray_image_item.cc
+++ b/ash/system/tray/tray_image_item.cc
@@ -35,7 +35,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_;
}
@@ -46,15 +46,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