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

Unified Diff: ash/system/chromeos/tray_display.cc

Issue 13947019: Clean up selected ash defines for MessagePumpLinux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 7 years, 8 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
Index: ash/system/chromeos/tray_display.cc
diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc
index cbe35a0990d1f413cc3399194325601f172eecbd..c3e3074e2ccfcbf7acc837067822c65a8538dead 100644
--- a/ash/system/chromeos/tray_display.cc
+++ b/ash/system/chromeos/tray_display.cc
@@ -58,6 +58,9 @@ class DisplayView : public ash::internal::ActionableView {
virtual ~DisplayView() {}
void Update() {
+#if !defined(USE_X11)
+ SetVisible(false);
+#else
chromeos::OutputState state =
base::chromeos::IsRunningOnChromeOS() ?
Shell::GetInstance()->output_configurator()->output_state() :
@@ -84,6 +87,7 @@ class DisplayView : public ash::internal::ActionableView {
default:
NOTREACHED();
}
+#endif
}
chromeos::OutputState InferOutputState() const {
@@ -142,12 +146,16 @@ TrayDisplay::TrayDisplay(SystemTray* system_tray)
: SystemTrayItem(system_tray),
default_(NULL) {
Shell::GetScreen()->AddObserver(this);
+#if defined(USE_X11)
Shell::GetInstance()->output_configurator()->AddObserver(this);
+#endif
}
TrayDisplay::~TrayDisplay() {
Shell::GetScreen()->RemoveObserver(this);
+#if defined(USE_X11)
Shell::GetInstance()->output_configurator()->RemoveObserver(this);
+#endif
}
views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) {

Powered by Google App Engine
This is Rietveld 408576698