summaryrefslogtreecommitdiffstats
path: root/base/system_monitor_win.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 17:33:10 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 17:33:10 +0000
commit1da97833c1c26bd972e91dee3d853efd92e12cb7 (patch)
tree49ce92fabb199933ebf6d773c374fc4d2802d028 /base/system_monitor_win.cc
parent91d4437eb5f7428338fc1cffbe13d0f634e41dcf (diff)
downloadchromium_src-1da97833c1c26bd972e91dee3d853efd92e12cb7.zip
chromium_src-1da97833c1c26bd972e91dee3d853efd92e12cb7.tar.gz
chromium_src-1da97833c1c26bd972e91dee3d853efd92e12cb7.tar.bz2
Don't fire two wake notifications for user-initiated system wake-from-sleep.
BUG=none TEST=none Review URL: http://codereview.chromium.org/242070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27627 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/system_monitor_win.cc')
-rw-r--r--base/system_monitor_win.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/base/system_monitor_win.cc b/base/system_monitor_win.cc
index 8bd604c..8a2d8c9 100644
--- a/base/system_monitor_win.cc
+++ b/base/system_monitor_win.cc
@@ -12,8 +12,11 @@ void SystemMonitor::ProcessWmPowerBroadcastMessage(int event_id) {
case PBT_APMPOWERSTATUSCHANGE: // The power status changed.
power_event = POWER_STATE_EVENT;
break;
- case PBT_APMRESUMEAUTOMATIC: // Non-user initiated resume from suspend.
- case PBT_APMRESUMESUSPEND: // User initiated resume from suspend.
+ 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.