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

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

Issue 2888983003: chromeos: Remove ash::SystemTrayDelegate::CreateTrayRotationLock (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | ash/system/tray/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 94a980b5876c327d0f88f8fc87a47f4f50834d05..9e8fc5d9c02ccd09708d9a550d59fca28eb350f2 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -10,6 +10,7 @@
#include "ash/key_event_watcher.h"
#include "ash/login_status.h"
+#include "ash/public/cpp/config.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/root_window_controller.h"
#include "ash/session/session_controller.h"
@@ -31,13 +32,13 @@
#include "ash/system/night_light/tray_night_light.h"
#include "ash/system/power/power_status.h"
#include "ash/system/power/tray_power.h"
+#include "ash/system/rotation/tray_rotation_lock.h"
#include "ash/system/screen_security/screen_capture_tray_item.h"
#include "ash/system/screen_security/screen_share_tray_item.h"
#include "ash/system/session/tray_session_length_limit.h"
#include "ash/system/supervised/tray_supervised_user.h"
#include "ash/system/tiles/tray_tiles.h"
#include "ash/system/tray/system_tray_controller.h"
-#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/system_tray_item.h"
#include "ash/system/tray/tray_bubble_wrapper.h"
#include "ash/system/tray/tray_constants.h"
@@ -267,12 +268,10 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
AddTrayItem(base::MakeUnique<TrayCapsLock>(this));
tray_night_light_ = new TrayNightLight(this);
AddTrayItem(base::WrapUnique(tray_night_light_));
- // TODO(jamescook): Remove this when mus has support for display management
+ // TODO(jamescook): Remove this when mash 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(std::move(tray_rotation_lock));
+ if (Shell::GetAshConfig() != Config::MASH)
+ AddTrayItem(base::MakeUnique<TrayRotationLock>(this));
tray_update_ = new TrayUpdate(this);
AddTrayItem(base::WrapUnique(tray_update_));
tray_tiles_ = new TrayTiles(this);
« no previous file with comments | « no previous file | ash/system/tray/system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698