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

Unified Diff: base/system_monitor/system_monitor_win.cc

Issue 11821050: Move power event handling logic from ui/ to base/ on Windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: use scoped_ptr Created 7 years, 10 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: base/system_monitor/system_monitor_win.cc
diff --git a/base/system_monitor/system_monitor_win.cc b/base/system_monitor/system_monitor_win.cc
index 69ab85e84f6852c34095a143342a3a0417e230bc..373a892639317085215e81fecee9e13c5f2bffb8 100644
--- a/base/system_monitor/system_monitor_win.cc
+++ b/base/system_monitor/system_monitor_win.cc
@@ -6,36 +6,6 @@
namespace base {
-void SystemMonitor::ProcessWmPowerBroadcastMessage(int event_id) {
- PowerEvent power_event;
- switch (event_id) {
- case PBT_APMPOWERSTATUSCHANGE: // The power status changed.
- power_event = POWER_STATE_EVENT;
- break;
- case PBT_APMRESUMEAUTOMATIC: // Resume from suspend.
- //case PBT_APMRESUMESUSPEND: // User-initiated resume from suspend.
- // We don't notify for this latter event
- // because if it occurs it is always sent as a
- // second event after PBT_APMRESUMEAUTOMATIC.
- power_event = RESUME_EVENT;
- break;
- case PBT_APMSUSPEND: // System has been suspended.
- power_event = SUSPEND_EVENT;
- break;
- default:
- return;
-
- // Other Power Events:
- // PBT_APMBATTERYLOW - removed in Vista.
- // PBT_APMOEMEVENT - removed in Vista.
- // PBT_APMQUERYSUSPEND - removed in Vista.
- // PBT_APMQUERYSUSPENDFAILED - removed in Vista.
- // PBT_APMRESUMECRITICAL - removed in Vista.
- // PBT_POWERSETTINGCHANGE - user changed the power settings.
- }
- ProcessPowerMessage(power_event);
-}
-
// Function to query the system to see if it is currently running on
// battery power. Returns true if running on battery.
bool SystemMonitor::IsBatteryPower() {

Powered by Google App Engine
This is Rietveld 408576698