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

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 11824005: chromeos: Update more code to get signals from powerd. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/power/resume_observer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 virtual void BrightnessChanged(int level, bool user_initiated) OVERRIDE { 1071 virtual void BrightnessChanged(int level, bool user_initiated) OVERRIDE {
1072 double leveld = static_cast<double>(level); 1072 double leveld = static_cast<double>(level);
1073 GetSystemTrayNotifier()->NotifyBrightnessChanged(leveld, user_initiated); 1073 GetSystemTrayNotifier()->NotifyBrightnessChanged(leveld, user_initiated);
1074 } 1074 }
1075 1075
1076 virtual void PowerChanged(const PowerSupplyStatus& power_status) OVERRIDE { 1076 virtual void PowerChanged(const PowerSupplyStatus& power_status) OVERRIDE {
1077 power_supply_status_ = power_status; 1077 power_supply_status_ = power_status;
1078 GetSystemTrayNotifier()->NotifyPowerStatusChanged(power_status); 1078 GetSystemTrayNotifier()->NotifyPowerStatusChanged(power_status);
1079 } 1079 }
1080 1080
1081 // Overridden from PowerManagerClient::Observer:
1082 virtual void SystemResumed(const base::TimeDelta& sleep_duration) OVERRIDE {
1083 GetSystemTrayNotifier()->NotifyRefreshClock();
1084 }
1085
1081 // Overridden from RootPowerManagerObserver: 1086 // Overridden from RootPowerManagerObserver:
1082 virtual void OnResume(const base::TimeDelta& sleep_duration) OVERRIDE { 1087 virtual void OnResume(const base::TimeDelta& sleep_duration) OVERRIDE {
1083 GetSystemTrayNotifier()->NotifyRefreshClock(); 1088 SystemResumed(sleep_duration);
1084 } 1089 }
1085 1090
1086 // Overridden from SessionManagerClient::Observer. 1091 // Overridden from SessionManagerClient::Observer.
1087 virtual void LockScreen() OVERRIDE { 1092 virtual void LockScreen() OVERRIDE {
1088 screen_locked_ = true; 1093 screen_locked_ = true;
1089 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange( 1094 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange(
1090 GetUserLoginStatus()); 1095 GetUserLoginStatus());
1091 } 1096 }
1092 1097
1093 virtual void UnlockScreen() OVERRIDE { 1098 virtual void UnlockScreen() OVERRIDE {
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1404 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1400 }; 1405 };
1401 1406
1402 } // namespace 1407 } // namespace
1403 1408
1404 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1409 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1405 return new chromeos::SystemTrayDelegate(); 1410 return new chromeos::SystemTrayDelegate();
1406 } 1411 }
1407 1412
1408 } // namespace chromeos 1413 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/power/resume_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698