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

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

Issue 2060003002: ash: Add a unit test for the system update tray item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@movetraydelegate
Patch Set: rebase 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
« no previous file with comments | « ash/system/tray/system_tray.h ('k') | ash/system/tray/tray_image_item.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 33675962d8c526f4dc9d5e22bf2c56dd849d8fb0..258b5a8ad0979bb33400a48edb256d1464709ce3 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -142,6 +142,7 @@ SystemTray::SystemTray(StatusAreaWidget* status_area_widget)
tray_accessibility_(nullptr),
tray_cast_(nullptr),
tray_date_(nullptr),
+ tray_update_(nullptr),
screen_capture_tray_item_(nullptr),
screen_share_tray_item_(nullptr) {
SetContentsBackground();
@@ -181,6 +182,7 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
tray_accessibility_ = new TrayAccessibility(this);
tray_date_ = new TrayDate(this);
+ tray_update_ = new TrayUpdate(this);
#if defined(OS_CHROMEOS)
AddTrayItem(new TraySessionLengthLimit(this));
@@ -207,13 +209,13 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
AddTrayItem(new TrayCapsLock(this));
AddTrayItem(new TrayRotationLock(this));
AddTrayItem(new TraySettings(this));
- AddTrayItem(new TrayUpdate(this));
+ AddTrayItem(tray_update_);
AddTrayItem(tray_date_);
#elif defined(OS_WIN)
AddTrayItem(tray_accessibility_);
if (media::CoreAudioUtil::IsSupported())
AddTrayItem(new TrayAudioWin(this));
- AddTrayItem(new TrayUpdate(this));
+ AddTrayItem(tray_update_);
AddTrayItem(tray_date_);
#endif
@@ -709,6 +711,10 @@ TrayCast* SystemTray::GetTrayCastForTesting() const { return tray_cast_; }
TrayDate* SystemTray::GetTrayDateForTesting() const { return tray_date_; }
+TrayUpdate* SystemTray::GetTrayUpdateForTesting() const {
+ return tray_update_;
+}
+
bool SystemTray::PerformAction(const ui::Event& event) {
// If we're already showing the default view, hide it; otherwise, show it
// (and hide any popup that's currently shown).
« no previous file with comments | « ash/system/tray/system_tray.h ('k') | ash/system/tray/tray_image_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698