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

Unified Diff: ash/system/power/tray_power.cc

Issue 10809008: Make spacing between uber tray items consistent with UI spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
Index: ash/system/power/tray_power.cc
diff --git a/ash/system/power/tray_power.cc b/ash/system/power/tray_power.cc
index 866964d57bbf6b2723b6334b85749651d1c239d3..a71e21131769b283db2b9d71ceacbdb7a9755d5e 100644
--- a/ash/system/power/tray_power.cc
+++ b/ash/system/power/tray_power.cc
@@ -9,6 +9,7 @@
#include "ash/system/date/date_view.h"
#include "ash/system/power/power_status_view.h"
#include "ash/system/power/power_supply_status.h"
+#include "ash/system/tray/system_tray.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_notification_view.h"
@@ -161,6 +162,8 @@ views::View* TrayPower::CreateTrayView(user::LoginStatus status) {
ash::Shell::GetInstance()->tray_delegate()->GetPowerSupplyStatus();
CHECK(power_tray_ == NULL);
power_tray_ = new tray::PowerTrayView();
+ UpdateAfterShelfAlignmentChange(
+ ash::Shell::GetInstance()->system_tray()->shelf_alignment());
power_tray_->UpdatePowerStatus(power_status);
return power_tray_;
}
@@ -198,6 +201,10 @@ void TrayPower::DestroyNotificationView() {
void TrayPower::UpdateAfterLoginStatusChange(user::LoginStatus status) {
}
+void TrayPower::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
+ SetTrayImageItemBorder(power_tray_, alignment);
+}
+
void TrayPower::OnPowerStatusChanged(const PowerSupplyStatus& status) {
if (power_tray_)
power_tray_->UpdatePowerStatus(status);

Powered by Google App Engine
This is Rietveld 408576698