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

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

Issue 2103113003: Fix shelf layout when switching from left-aligned shelf to right-aligned shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 4 years, 6 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
« ash/system/status_area_widget.cc ('K') | « ash/system/tray/system_tray.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index 35227cb0f4bc85a16dd6dff3989d8434143a9bf0..e5b56d1812ba31903bf368aeab4d50643328456e 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -149,12 +149,12 @@ SystemTray::~SystemTray() {
}
}
-void SystemTray::InitializeTrayItems(
- SystemTrayDelegate* delegate,
- WebNotificationTray* web_notification_tray) {
+void SystemTray::InitializeTrayItems(SystemTrayDelegate* delegate,
+ WebNotificationTray* web_notification_tray,
+ const gfx::Insets& insets) {
DCHECK(web_notification_tray);
web_notification_tray_ = web_notification_tray;
- TrayBackgroundView::Initialize();
+ TrayBackgroundView::Initialize(insets);
CreateItems(delegate);
}
@@ -600,10 +600,11 @@ base::string16 SystemTray::GetAccessibleTimeString(
base::kKeepAmPm);
}
-void SystemTray::SetShelfAlignment(ShelfAlignment alignment) {
+void SystemTray::SetShelfAlignment(ShelfAlignment alignment,
+ const gfx::Insets& insets) {
if (alignment == shelf_alignment())
return;
- TrayBackgroundView::SetShelfAlignment(alignment);
+ TrayBackgroundView::SetShelfAlignment(alignment, insets);
UpdateAfterShelfAlignmentChange(alignment);
// Destroy any existing bubble so that it is rebuilt correctly.
CloseSystemBubbleAndDeactivateSystemTray();
« ash/system/status_area_widget.cc ('K') | « ash/system/tray/system_tray.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698