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

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

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modified CL to provide TrayItems and Tray*Views with parent pointers instead. Created 8 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/system/power/tray_power.cc
diff --git a/ash/system/power/tray_power.cc b/ash/system/power/tray_power.cc
index 27696e70066e853f39e3eb288d678ea0bc7c31bc..996d13246d424671c838095799fb36bb1b086989 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"
@@ -133,8 +134,9 @@ class PowerNotificationView : public TrayNotificationView {
using tray::PowerNotificationView;
-TrayPower::TrayPower()
- : power_tray_(NULL),
+TrayPower::TrayPower(SystemTray* system_tray)
+ : SystemTrayItem(system_tray),
+ power_tray_(NULL),
notification_view_(NULL),
notification_state_(NOTIFICATION_NONE) {
}

Powered by Google App Engine
This is Rietveld 408576698