Index: content/renderer/idle_user_detector.cc |
diff --git a/content/renderer/idle_user_detector.cc b/content/renderer/idle_user_detector.cc |
index 43979cfb722ebbbb322b822c0d665c78a998475d..4414b9638afd3890978d68137073e086bb11a1ab 100644 |
--- a/content/renderer/idle_user_detector.cc |
+++ b/content/renderer/idle_user_detector.cc |
@@ -12,11 +12,9 @@ |
namespace content { |
IdleUserDetector::IdleUserDetector(RenderView* render_view) |
- : RenderViewObserver(render_view){ |
-} |
+ : RenderViewObserver(render_view) {} |
-IdleUserDetector::~IdleUserDetector() { |
-} |
+IdleUserDetector::~IdleUserDetector() {} |
bool IdleUserDetector::OnMessageReceived(const IPC::Message& message) { |
IPC_BEGIN_MESSAGE_MAP(IdleUserDetector, message) |
@@ -25,11 +23,7 @@ bool IdleUserDetector::OnMessageReceived(const IPC::Message& message) { |
return false; |
} |
-void IdleUserDetector::OnHandleInputEvent( |
- const blink::WebInputEvent* event, |
- const std::vector<const blink::WebInputEvent*>& coalesced_events, |
- const ui::LatencyInfo& latency_info, |
- InputEventDispatchType dispatch_type) { |
+void IdleUserDetector::ActivityDetected() { |
if (GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
if (render_thread != NULL) { |
@@ -38,8 +32,14 @@ void IdleUserDetector::OnHandleInputEvent( |
} |
} |
-void IdleUserDetector::OnDestruct() { |
- delete this; |
+void IdleUserDetector::OnHandleInputEvent( |
+ const blink::WebInputEvent* event, |
+ const std::vector<const blink::WebInputEvent*>& coalesced_events, |
+ const ui::LatencyInfo& latency_info, |
+ InputEventDispatchType dispatch_type) { |
+ ActivityDetected(); |
} |
+void IdleUserDetector::OnDestruct() {} |
+ |
} // namespace content |