| 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/macros.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| 11 #include "content/common/power_monitor_messages.h" | 11 #include "content/common/power_monitor_messages.h" |
| 12 #include "ipc/message_filter.h" | 12 #include "ipc/message_filter.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 class PowerMessageFilter : public IPC::MessageFilter { | 16 class PowerMessageFilter : public IPC::MessageFilter { |
| 17 public: | 17 public: |
| 18 PowerMessageFilter(PowerMonitorBroadcastSource* source, | 18 PowerMessageFilter(PowerMonitorBroadcastSource* source, |
| 19 scoped_refptr<base::SingleThreadTaskRunner> task_runner) | 19 scoped_refptr<base::SingleThreadTaskRunner> task_runner) |
| 20 : source_(source), task_runner_(task_runner) {} | 20 : source_(source), task_runner_(task_runner) {} |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 void PowerMonitorBroadcastSource::OnSuspend() { | 100 void PowerMonitorBroadcastSource::OnSuspend() { |
| 101 ProcessPowerEvent(PowerMonitorSource::SUSPEND_EVENT); | 101 ProcessPowerEvent(PowerMonitorSource::SUSPEND_EVENT); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void PowerMonitorBroadcastSource::OnResume() { | 104 void PowerMonitorBroadcastSource::OnResume() { |
| 105 ProcessPowerEvent(PowerMonitorSource::RESUME_EVENT); | 105 ProcessPowerEvent(PowerMonitorSource::RESUME_EVENT); |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace content | 108 } // namespace content |
| OLD | NEW |