| Index: content/gpu/gpu_main.cc
|
| diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
| index 794617dde93681fba6c84b4bba9635e1cf178bbc..1497c4ab83beca7b4a8ac143448d283e4ffb760e 100644
|
| --- a/content/gpu/gpu_main.cc
|
| +++ b/content/gpu/gpu_main.cc
|
| @@ -11,6 +11,7 @@
|
| #include "base/debug/trace_event.h"
|
| #include "base/lazy_instance.h"
|
| #include "base/message_loop.h"
|
| +#include "base/power_monitor/power_monitor.h"
|
| #include "base/rand_util.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/stringprintf.h"
|
| @@ -19,6 +20,7 @@
|
| #include "content/child/child_process.h"
|
| #include "content/common/gpu/gpu_config.h"
|
| #include "content/common/gpu/gpu_messages.h"
|
| +#include "content/common/power_monitor_broadcast_source.h"
|
| #include "content/common/sandbox_linux.h"
|
| #include "content/gpu/gpu_child_thread.h"
|
| #include "content/gpu/gpu_process.h"
|
| @@ -169,6 +171,9 @@ int GpuMain(const MainFunctionParams& parameters) {
|
| delayed_watchdog_enable = true;
|
| #endif
|
|
|
| + PowerMonitorBroadcastSource* power_monitor_source =
|
| + new PowerMonitorBroadcastSource();
|
| + base::PowerMonitor power_monitor(power_monitor_source);
|
| scoped_refptr<GpuWatchdogThread> watchdog_thread;
|
|
|
| // Start the GPU watchdog only after anything that is expected to be time
|
| @@ -286,6 +291,9 @@ int GpuMain(const MainFunctionParams& parameters) {
|
| dead_on_arrival,
|
| gpu_info,
|
| deferred_messages.Get());
|
| +
|
| + child_thread->channel()->AddFilter(power_monitor_source->MessageFilter());
|
| +
|
| while (!deferred_messages.Get().empty())
|
| deferred_messages.Get().pop();
|
|
|
|
|