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

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

Issue 2148943002: mash: Create system tray display and rotation lock items via delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments, add rotation lock Created 4 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
« no previous file with comments | « ash/system/tray/system_tray.h ('k') | ash/test/test_system_tray_delegate.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 b9b8141f17e0e7eb8021c01f73d1a188fc9a1505..f48c58b55d73baa8769b4d47c553375943c3b3f9 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -62,8 +62,6 @@
#include "ash/common/system/chromeos/tray_caps_lock.h"
#include "ash/common/system/chromeos/tray_tracing.h"
#include "ash/common/system/ime/tray_ime_chromeos.h"
-#include "ash/system/chromeos/rotation/tray_rotation_lock.h"
-#include "ash/system/chromeos/tray_display.h"
#include "ui/message_center/message_center.h"
#endif
@@ -197,7 +195,12 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
AddTrayItem(new TrayBluetooth(this));
tray_cast_ = new TrayCast(this);
AddTrayItem(tray_cast_);
- AddTrayItem(new TrayDisplay(this));
+ // TODO(jamescook): Remove this when mus has support for display management
+ // and we have a DisplayManager equivalent. See http://crbug.com/548429
+ std::unique_ptr<SystemTrayItem> tray_display =
+ delegate->CreateDisplayTrayItem(this);
+ if (tray_display)
+ AddTrayItem(tray_display.release());
screen_capture_tray_item_ = new ScreenCaptureTrayItem(this);
AddTrayItem(screen_capture_tray_item_);
screen_share_tray_item_ = new ScreenShareTrayItem(this);
@@ -206,7 +209,12 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
AddTrayItem(new TrayAudioChromeOs(this));
AddTrayItem(new TrayBrightness(this));
AddTrayItem(new TrayCapsLock(this));
- AddTrayItem(new TrayRotationLock(this));
+ // TODO(jamescook): Remove this when mus has support for display management
+ // and we have a DisplayManager equivalent. See http://crbug.com/548429
+ std::unique_ptr<SystemTrayItem> tray_rotation_lock =
+ delegate->CreateRotationLockTrayItem(this);
+ if (tray_rotation_lock)
+ AddTrayItem(tray_rotation_lock.release());
AddTrayItem(new TraySettings(this));
AddTrayItem(tray_update_);
AddTrayItem(tray_date_);
@@ -233,10 +241,6 @@ void SystemTray::AddTrayItem(SystemTrayItem* item) {
}
}
-void SystemTray::RemoveTrayItem(SystemTrayItem* item) {
- NOTIMPLEMENTED();
-}
-
const std::vector<SystemTrayItem*>& SystemTray::GetTrayItems() const {
return items_.get();
}
« no previous file with comments | « ash/system/tray/system_tray.h ('k') | ash/test/test_system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698