Index: content/common/gpu/gpu_channel.cc |
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc |
index 0c5172cf45cf0a9c5586381dc8f7687b3ee10c03..32244e23b65c8ccecb602edd3e05a886ef754d18 100644 |
--- a/content/common/gpu/gpu_channel.cc |
+++ b/content/common/gpu/gpu_channel.cc |
@@ -15,6 +15,7 @@ |
#include "base/command_line.h" |
#include "base/debug/trace_event.h" |
#include "base/message_loop/message_loop_proxy.h" |
+#include "base/power_monitor/power_monitor.h" |
#include "base/process_util.h" |
#include "base/rand_util.h" |
#include "base/strings/string_util.h" |
@@ -22,6 +23,7 @@ |
#include "content/common/gpu/gpu_channel_manager.h" |
#include "content/common/gpu/gpu_messages.h" |
#include "content/common/gpu/sync_point_manager.h" |
+#include "content/common/power_monitor_message_filter.h" |
#include "content/public/common/content_switches.h" |
#include "crypto/hmac.h" |
#include "gpu/command_buffer/common/mailbox.h" |
@@ -487,6 +489,11 @@ bool GpuChannel::Init(base::MessageLoopProxy* io_message_loop, |
io_message_loop_ = io_message_loop; |
channel_->AddFilter(filter_.get()); |
+ PowerMonitorBroadcastSource* power_monitor_source_ = |
+ static_cast<PowerMonitorBroadcastSource*>( |
vandebo (ex-Chrome)
2013/06/26 21:40:33
Is it easy to get at the original source instead o
|
+ base::PowerMonitor::Get()->Source()); |
+ channel_->AddFilter(power_monitor_source_->MessageFilter()); |
vandebo (ex-Chrome)
2013/06/26 21:40:33
Is there ever a RemoveFilter call? The concern is
Ken Russell (switch to Gerrit)
2013/06/27 13:08:23
This setup doesn't look correct to me. You want to
bajones
2013/07/01 20:21:58
I don't see any examples of a filter being removed
bajones
2013/07/01 20:21:58
I've moved the addition of the message filter into
|
+ |
return true; |
} |