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

Unified Diff: ash/common/system/chromeos/screen_security/screen_tray_item.cc

Issue 2465403002: Some more fixes to cros system tray icons (esp. screen tray items) (Closed)
Patch Set: commentary Created 4 years, 1 month 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
Index: ash/common/system/chromeos/screen_security/screen_tray_item.cc
diff --git a/ash/common/system/chromeos/screen_security/screen_tray_item.cc b/ash/common/system/chromeos/screen_security/screen_tray_item.cc
index d3613a3185eb522af270bfc64d5269276a710751..9a6c415d3c29c57e3e6e283997ce2094b71ecc20 100644
--- a/ash/common/system/chromeos/screen_security/screen_tray_item.cc
+++ b/ash/common/system/chromeos/screen_security/screen_tray_item.cc
@@ -183,6 +183,11 @@ void ScreenTrayItem::Stop() {
callback.Run();
}
+views::View* ScreenTrayItem::CreateTrayView(LoginStatus status) {
+ tray_view_ = new tray::ScreenTrayView(this);
+ return tray_view_;
+}
+
void ScreenTrayItem::RecordStoppedFromDefaultViewMetric() {}
void ScreenTrayItem::RecordStoppedFromNotificationViewMetric() {}
@@ -195,16 +200,4 @@ void ScreenTrayItem::DestroyDefaultView() {
default_view_ = NULL;
}
-void ScreenTrayItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
- if (!tray_view_)
- return;
-
- // Center the item dependent on the orientation of the shelf.
- views::BoxLayout::Orientation layout = IsHorizontalAlignment(alignment)
- ? views::BoxLayout::kHorizontal
- : views::BoxLayout::kVertical;
- tray_view_->SetLayoutManager(new views::BoxLayout(layout, 0, 0, 0));
- tray_view_->Layout();
-}
-
} // namespace ash
« no previous file with comments | « ash/common/system/chromeos/screen_security/screen_tray_item.h ('k') | ash/common/system/tray/tray_item_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698