OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/child/power_monitor_broadcast_source.h" | 5 #include "content/child/power_monitor_broadcast_source.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/macros.h" |
8 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
9 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
10 #include "content/common/power_monitor_messages.h" | 11 #include "content/common/power_monitor_messages.h" |
11 #include "ipc/message_filter.h" | 12 #include "ipc/message_filter.h" |
12 | 13 |
13 namespace content { | 14 namespace content { |
14 | 15 |
15 class PowerMessageFilter : public IPC::MessageFilter { | 16 class PowerMessageFilter : public IPC::MessageFilter { |
16 public: | 17 public: |
17 PowerMessageFilter(PowerMonitorBroadcastSource* source, | 18 PowerMessageFilter(PowerMonitorBroadcastSource* source, |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 99 |
99 void PowerMonitorBroadcastSource::OnSuspend() { | 100 void PowerMonitorBroadcastSource::OnSuspend() { |
100 ProcessPowerEvent(PowerMonitorSource::SUSPEND_EVENT); | 101 ProcessPowerEvent(PowerMonitorSource::SUSPEND_EVENT); |
101 } | 102 } |
102 | 103 |
103 void PowerMonitorBroadcastSource::OnResume() { | 104 void PowerMonitorBroadcastSource::OnResume() { |
104 ProcessPowerEvent(PowerMonitorSource::RESUME_EVENT); | 105 ProcessPowerEvent(PowerMonitorSource::RESUME_EVENT); |
105 } | 106 } |
106 | 107 |
107 } // namespace content | 108 } // namespace content |
OLD | NEW |