OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer/idle_user_detector.h" | 5 #include "content/renderer/idle_user_detector.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/common/input_messages.h" | 8 #include "content/common/input_messages.h" |
9 #include "content/public/renderer/content_renderer_client.h" | 9 #include "content/public/renderer/content_renderer_client.h" |
10 #include "content/renderer/render_thread_impl.h" | 10 #include "content/renderer/render_thread_impl.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 const ui::LatencyInfo& latency_info, | 30 const ui::LatencyInfo& latency_info, |
31 InputEventDispatchType dispatch_type) { | 31 InputEventDispatchType dispatch_type) { |
32 if (GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 32 if (GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
33 RenderThreadImpl* render_thread = RenderThreadImpl::current(); | 33 RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
34 if (render_thread != NULL) { | 34 if (render_thread != NULL) { |
35 render_thread->PostponeIdleNotification(); | 35 render_thread->PostponeIdleNotification(); |
36 } | 36 } |
37 } | 37 } |
38 } | 38 } |
39 | 39 |
| 40 void IdleUserDetector::OnDestruct() { |
| 41 delete this; |
| 42 } |
| 43 |
40 } // namespace content | 44 } // namespace content |
OLD | NEW |