OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/system/audio/audio_observer.h" | 9 #include "ash/system/audio/audio_observer.h" |
10 #include "ash/system/bluetooth/bluetooth_observer.h" | 10 #include "ash/system/bluetooth/bluetooth_observer.h" |
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 } | 924 } |
925 | 925 |
926 // Overridden from PowerManagerClient::Observer. | 926 // Overridden from PowerManagerClient::Observer. |
927 virtual void BrightnessChanged(int level, bool user_initiated) OVERRIDE { | 927 virtual void BrightnessChanged(int level, bool user_initiated) OVERRIDE { |
928 tray_->brightness_observer()-> | 928 tray_->brightness_observer()-> |
929 OnBrightnessChanged(static_cast<double>(level), user_initiated); | 929 OnBrightnessChanged(static_cast<double>(level), user_initiated); |
930 } | 930 } |
931 | 931 |
932 virtual void PowerChanged(const PowerSupplyStatus& power_status) OVERRIDE { | 932 virtual void PowerChanged(const PowerSupplyStatus& power_status) OVERRIDE { |
933 power_supply_status_ = power_status; | 933 power_supply_status_ = power_status; |
934 ash::PowerStatusObserver* observer = tray_->power_status_observer(); | 934 tray_->NotifyPowerStatusChange(power_status); |
935 if (observer) | |
936 observer->OnPowerStatusChanged(power_status); | |
937 } | 935 } |
938 | 936 |
939 virtual void SystemResumed() OVERRIDE { | 937 virtual void SystemResumed() OVERRIDE { |
940 NotifyRefreshClock(); | 938 NotifyRefreshClock(); |
941 } | 939 } |
942 | 940 |
943 virtual void LockScreen() OVERRIDE { | 941 virtual void LockScreen() OVERRIDE { |
944 screen_locked_ = true; | 942 screen_locked_ = true; |
945 tray_->UpdateAfterLoginStatusChange(GetUserLoginStatus()); | 943 tray_->UpdateAfterLoginStatusChange(GetUserLoginStatus()); |
946 } | 944 } |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1235 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1233 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1236 }; | 1234 }; |
1237 | 1235 |
1238 } // namespace | 1236 } // namespace |
1239 | 1237 |
1240 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { | 1238 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { |
1241 return new chromeos::SystemTrayDelegate(tray); | 1239 return new chromeos::SystemTrayDelegate(tray); |
1242 } | 1240 } |
1243 | 1241 |
1244 } // namespace chromeos | 1242 } // namespace chromeos |
OLD | NEW |