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

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

Issue 17157007: cros: Show notification when low-power charger connected (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reupload Created 7 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
« no previous file with comments | « ash/system/chromeos/power/tray_power_unittest.cc ('k') | ui/message_center/fake_message_center.h » ('j') | 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 eb183ec0c122191c2b2bea48b4b451bbc8aa0c06..0117c6cd79ef43fa5f45074feb999118d0b859eb 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -58,6 +58,7 @@
#include "ash/system/chromeos/screen_security/screen_share_tray_item.h"
#include "ash/system/chromeos/settings/tray_settings.h"
#include "ash/system/chromeos/tray_display.h"
+#include "ui/message_center/message_center.h"
#endif
using views::TrayBubbleView;
@@ -120,7 +121,8 @@ SystemTray::SystemTray(internal::StatusAreaWidget* status_area_widget)
: internal::TrayBackgroundView(status_area_widget),
items_(),
default_bubble_height_(0),
- hide_notifications_(false) {
+ hide_notifications_(false),
+ tray_accessibility_(NULL) {
SetContentsBackground();
}
@@ -164,7 +166,8 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
tray_accessibility_ = new internal::TrayAccessibility(this);
AddTrayItem(tray_accessibility_);
#if defined(OS_CHROMEOS)
- AddTrayItem(new internal::TrayPower(this));
+ AddTrayItem(
+ new internal::TrayPower(this, message_center::MessageCenter::Get()));
#endif
#if defined(OS_CHROMEOS)
AddTrayItem(new internal::TrayNetwork(this));
« no previous file with comments | « ash/system/chromeos/power/tray_power_unittest.cc ('k') | ui/message_center/fake_message_center.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698